@jgw,

Thanks for the rescue. I thought I was going crazy. Totally forgot about the
effects of doctype.

Nice to have: when the eclipse project wizard (or the app creator tool) is
updated to create a UiBinder-style Greeting template, it would be nice if
the doctype in the template html page was switched to standards-mode. Less
heart attacks for sleepy coders ;)

sfm


On Thu, Dec 10, 2009 at 9:18 AM, Joel Webber <[email protected]> wrote:

> [duplicating my last message because it failed to post to groups/gwt last
> time]
>
>
> On Thu, Dec 10, 2009 at 9:11 AM, Joel Webber <[email protected]> wrote:
>
>> The problem here is that you're using RootLayoutPanel explicitly, which
>> requires the use of a standards-mode doctype.
>>
>>  * This widget will <em>only</em> work in standards mode, which requires
>> that
>>  * the HTML page in which it is run have an explicit &lt;!DOCTYPE&gt;
>>  * declaration.
>>
>> The good news is that these days you can just throw a <!DOCTYPE html>
>> declaration at the top of the page to get there -- no need to dig through
>> the 37 different versions of [x]html doctypes. IE is particularly strange in
>> quirks mode, which is why you're seeing such a large difference.
>>
>> Hope that helps,
>> joel.
>>
>> On Wed, Dec 9, 2009 at 9:36 PM, Stuart <[email protected]> wrote:
>>
>>> @bruce, @jwg, @rjrjr
>>>
>>> (and any other gwt'ers listening)
>>>
>>> I just posted about a fairly severe show-stopper for my application
>>> (that is, the app doesn't even finish onModuleLoad() in IE7 (see
>>>
>>> http://groups.google.com/group/google-web-toolkit/browse_thread/thread/952cdae8b5efa1d3
>>> )
>>>
>>> I thought it was likely due to my code. So I built a dead simple
>>> EntryPoint using the UiBinder wizard with a few touch ups:
>>>
>>> import com.google.gwt.core.client.EntryPoint;
>>> import com.google.gwt.core.client.GWT;
>>> import com.google.gwt.uibinder.client.UiBinder;
>>> import com.google.gwt.uibinder.client.UiField;
>>> import com.google.gwt.user.client.ui.Button;
>>> import com.google.gwt.user.client.ui.HTMLPanel;
>>> import com.google.gwt.user.client.ui.RootLayoutPanel;
>>> import com.google.gwt.user.client.ui.Widget;
>>>
>>> public class UiBinderTestForIE implements EntryPoint {
>>>
>>>        private static UiBinderTestForIEBinder uiBinder = GWT.create
>>> (UiBinderTestForIEBinder.class);
>>>        interface UiBinderTestForIEBinder extends UiBinder<Widget,
>>> UiBinderTestForIE> {}
>>>
>>>        @UiField Button button;
>>>        @UiField HTMLPanel htmlPanel;
>>>
>>>        public void onModuleLoad() {
>>>
>>>                Widget w = uiBinder.createAndBindUi(this);
>>>                RootLayoutPanel root = RootLayoutPanel.get();
>>>                root.add(w);
>>>        }
>>>
>>> }
>>>
>>> And here is the ui.xml
>>>
>>> <!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent";>
>>> <ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
>>>        xmlns:g="urn:import:com.google.gwt.user.client.ui">
>>>        <ui:style>
>>>                .important {
>>>                        font-weight: bold;
>>>                }
>>>        </ui:style>
>>>        <g:HTMLPanel ui:field="htmlPanel">
>>>                Hello,
>>>                <g:Button styleName="{style.important}"
>>> ui:field="button">User</
>>> g:Button>
>>>        </g:HTMLPanel>
>>> </ui:UiBinder>
>>>
>>> When I launch this in Chrome / FF, I get what I expect. When launched
>>> in IE7, there is nothing on the page. Yet, the console reports that
>>> the module has been loaded.
>>>
>>> At first I thought it was a problem with the developer plugin in IE,
>>> so I compiled it and put it up on my App Engine sandbox:
>>> http://uibindertestforie.latest.emcode-dev.appspot.com and tested from
>>> two different machines. Works in FF/Chrome on both machines. Nothing
>>> in IE7 on either machine.
>>>
>>> What's the deal?
>>>
>>> Again, it could be my code. But, really? GWT 2.0 is dead in IE7? I
>>> can't actually believe it, so someone please tell me what I am doing
>>> wrong.
>>>
>>> Stuart
>>>
>>> [cross-posting to gwt, gwt-contrib]
>>>
>>> --
>>>
>>> You received this message because you are subscribed to the Google Groups
>>> "Google Web Toolkit" group.
>>> To post to this group, send email to [email protected]
>>> .
>>> To unsubscribe from this group, send email to
>>> [email protected]<google-web-toolkit%[email protected]>
>>> .
>>> For more options, visit this group at
>>> http://groups.google.com/group/google-web-toolkit?hl=en.
>>>
>>>
>>>
>>
>  --
> http://groups.google.com/group/Google-Web-Toolkit-Contributors
>

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to