Hello, I have the same problem. You found the solution ? Or anyone !!
Thx Le jeudi 7 juillet 2011 13:50:56 UTC+2, Tiago Rinck Caveden a écrit : > > Hello all, > > I'm a newbie in GWT and I am struggling to create a dialog box using > UIBinder. I'm sorry if this has already been discussed but I couldn't find > it. > > This is the graphical result of my dialog :-( > [image: Screenshot.png] > > The code that I'm doing is the following. > First, the java code for the view: > > public class DebtorCreationDialog extends DialogBox { > > @UiTemplate("DebtorCreationDialog.ui.xml") > interface DebtorCreationDialogUiBinder extends > UiBinder<Widget, DebtorCreationDialog> { > } > > private static DebtorCreationDialogUiBinder uiBinder = GWT > .create(DebtorCreationDialogUiBinder.class); > > @UiField TextBox debtorSurname; > > @UiField TextBox debtorGivenName; > > public DebtorCreationDialog() { > uiBinder.createAndBindUi(this); > setSize("400px","300px"); > } > > public String getDebtorSurname() { > return debtorSurname.getText(); > } > > > public void setDebtorSurname(String surname) { > debtorSurname.setText(surname); > } > > > public String getDebtorGivenName() { > return debtorGivenName.getText(); > } > > public void setDebtorGivenName(String givenName) { > debtorGivenName.setText(givenName); > } > } > > > Here, the UI XML code for the binder: > > <ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder" > xmlns:g="urn:import:com.google.gwt.user.client.ui"> > <g:HTMLPanel> > <g:DialogBox autoHide="true" modal="true" animationEnabled="true" > glassEnabled="true"> > <g:caption> > <b><ui:msg key="debtorCreationDialog.caption">Insertion de > nouveau débiteur</ui:msg></b> > </g:caption> > <g:HTMLPanel> > <g:HorizontalSplitPanel> > <!-- Left column --> > <g:VerticalPanel> > <g:Label><ui:msg key="mandates.debtorSurname">Nom > du débiteur</ui:msg></g:Label> > <g:TextBox name="debtorSurname" maxLength="60" > ui:field="debtorSurname" /> > </g:VerticalPanel> > > <!-- Right column --> > <g:VerticalPanel> > <g:Label><ui:msg > key="mandates.debtorGivenName">Prénom du débiteur</ui:msg></g:Label> > <g:TextBox name="debtorGivenName" maxLength="60" > ui:field="debtorGivenName"/> > </g:VerticalPanel> > </g:HorizontalSplitPanel> > </g:HTMLPanel> > </g:DialogBox> > </g:HTMLPanel> > </ui:UiBinder> > > > Does anyone have any idea of what am I doing wrong? > > Two other questions I'd like to ask, if I manage to solve the main problem > above: > > - Must I do the setSize in the java code for the dialog not to be > tiny? I tried adding the attributes length and width to g:DialogBox but > that didn't work. > - Can't I center the dialog by setting some attribute in the XML? I > saw the center() method, but I'd rather do it in the XML if possible. > > > Thank you. > -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. For more options, visit https://groups.google.com/groups/opt_out.