PDA

View Full Version : Margins within UiBinder is not working [verified with VerticalLayout (UiBinder)]



nbuesing
18 Jan 2012, 2:30 PM
Using a local version of Ext GWT Explorer Demo, I went to VerticalLayout and changed the center marges to

c.add(label2, new VerticalLayoutData(1, -200, new Margins(40, 40, 40, 40)));

The showcase then had the expected margins.

Now, I got to the "VerticalLayout (UiBinder)" and update the XML as follows


<ui:with type="com.sencha.gxt.core.client.util.Margins" field="centerMargins">
<ui:attributes top="40" right="40" bottom="40" left="40" />
</ui:with>

No change, it shows like it did before and has no margins close to the non UiBinder change.

nbuesing
8 Feb 2012, 2:05 PM
I have wondered why this doesn't work with all of the examples provided in the Explorer demo showing ui:with/ui:attribute.

I cam across this; I have included screenshot since "Coming in future (post-2.4)" is a CSS image so it cannot be selected.

http://code.google.com/webtoolkit/doc/latest/DevGuideUiBinder.html

31505

(http://code.google.com/webtoolkit/doc/latest/DevGuideUiBinder.html)Since GWT 2.4 is the current release of GWT, I'm surprised GXT is using a feature that is not yet available for use.

Is there any other post GWT 2.4 functionality that is being used by GXT3 that I should know about?

I think the ui.xml files in the explorer demo should have a comment that says ui:attribute is not available with GWT 2.4.


Can someone from within GXT confirm this.

sven
8 Feb 2012, 2:50 PM
s there any other post GWT 2.4 functionality that is being used by GXT3 that I should know about?

I think the ui.xml files in the explorer demo should have a comment that says ui:attribute is not available with GWT 2.4.

GXT offers an own module to add support for this right now. You should inherit the GXT UiBinder module.

nbuesing
10 Feb 2012, 7:45 AM
Thanks. I thought that code was legacy, since it isn't in subversion

The following folder (in this branch as well as the trunk) is empty

http://svn.sencha.com/svn/sencha/EXTGWT/branches/3.0/com.sencha.gxt/com.sencha.gxt.uibinder/src/main/java/com/sencha/gxt/uibinder

Also, when I download and build according to build_instructionx.html, I would get an error with UiBinder.gwt.xml, assuming it was old code from current development. I see that it is part of the beta2 zip, and will use that one, but I have been building/testing from subversion, and I suppose I should have done more research when Explorer demo wasn't able to find the UiBinder.gwt.xml file.