i get it to work, my previous post i miss out a </ui:UiBinder> at the
bottom
<!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">
<g:HTMLPanel>
<g:DialogBox ui:field=myDialogBox" autoHide="true"
modal="true">
<g:caption><b>Caption</b></g:caption>
</g:DialogBox>
<g:Button ui:field="clickBtn">Click Me</g:Button>
</g:HTMLPanel>
</ui:UiBinder>
the fix is to call these right after
initWidget(uiBinder.createAndBindUi(this));
myDialogBox.show();
myDialogBox.hide();
so it wont show right after the gadget is loaded
On Jun 9, 1:24 am, Alex <[email protected]> wrote:
> i use uiBinder and have this
> <!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">
> <g:HTMLPanel>
> <g:DialogBox ui:field=myDialogBox" autoHide="true"
> modal="true">
> <g:caption><b>Caption</b></g:caption>
> </g:DialogBox>
> <g:Button ui:field="clickBtn">Click Me</g:Button>
> </g:HTMLPanel>
>
> right after the gadget is loaded, the dialog is already shown.it only
> start showing normally after i click on Click Me button
>
> However when i create the DialogBox in code
> myDialogBox=new DialogBox(true,true);
> myDialogBox.setHTML("<b>Caption</b>");
>
> i still use the uiBinder, just that i remove the dialogbox part
> <!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">
> <g:HTMLPanel>
> <g:Button ui:field="clickBtn">Click Me</g:Button>
> </g:HTMLPanel>
> it work as expected.
--
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].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.