assetsense / gwtwindowmanager

Automatically exported from code.google.com/p/gwtwindowmanager
0 stars 0 forks source link

'-mozOpacity' style attribute doesn't work in gwt 1.7.x hosted mode #63

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. This is on line 33 of OutlinePanel.java
2. Simply instantiating a DefaultGInternalFrame in hosted mode with gwt 
1.7.x causes this error
3.

What is the expected output? What do you see instead?
for a new window to appear on the screen.  instead, the following error:
java.lang.AssertionError: The style name '-mozOpacity' should be in 
camelCase format

What version of the product are you using? On what operating system?
0.6.6, windows xp

Please provide any additional information below.
the newest version of GWT doesn't like style names with hyphens at the 
beginning.  Dumb issue, but really need this resolved to move on with my 
project (which I'd be glad to tell you more about if interested).

Original issue reported on code.google.com by ramo...@gmail.com on 5 Oct 2009 at 9:11

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
/*
 * Copyright (c) 2006-2007 Luciano Broussal <luciano.broussal AT gmail.com>
 * (http://www.gwtwindowmanager.org)
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */
package org.gwm.client.impl;

import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.ui.SimplePanel;

public class OutlinePanel extends SimplePanel {

    public OutlinePanel() {
        initUI();
    }

    private void initUI() {
        DOM.setStyleAttribute(getElement(), "backgroundColor", "#DFF2FF");
        DOM.setStyleAttribute(getElement(), "position", "absolute");
        DOM.setStyleAttribute(getElement(), "filter",
                "progid:DXImageTransform.Microsoft.Alpha(opacity=50)");
//        DOM.setStyleAttribute(getElement(), "-mozOpacity", "0.5");
        DOM.setStyleAttribute(getElement(), "opacity", "0.5");
        DOM.setStyleAttribute(getElement(), "border", "1px dotted gray");
    }

    public void setTop(int top) {
        DOM.setStyleAttribute(getElement(), "top", top + "px");
    }

    public void setLeft(int left) {
        DOM.setStyleAttribute(getElement(), "left", left + "px");
    }

    public void setDeep(int deep) {
        DOM.setIntStyleAttribute(getElement(), "zIndex", deep);
    }
}

Original comment by harryha...@gmail.com on 4 Dec 2009 at 5:39

GoogleCodeExporter commented 8 years ago
See this bug:

http://code.google.com/p/google-web-toolkit/issues/detail?id=5152

"No, you SHOULD use backgroundColor, as in elt.style.backgroundColor in "plain 
old JavaScript". The assertion is there so you don't try 
elt.style["background-color"], which doesn't work in all browsers (and isn't 
spec-compliant; W3C says you should use backgroundColr, and that's what all 
browsers expect too)"

Original comment by LinuxC...@gmail.com on 12 Aug 2010 at 2:12

GoogleCodeExporter commented 8 years ago
Here you can find all valid properties:

http://www.w3schools.com/jsref/dom_obj_style.asp

Original comment by LinuxC...@gmail.com on 12 Aug 2010 at 2:39