-
26 Jan 2012 11:55 PM #1
BorderLayout UiBinder completely ignores LayoutData
BorderLayout UiBinder completely ignores LayoutData
I've been trying to get the BorderLayoutContainer to work following the examples. It seems that it simply ignores the layoutData I pass. I've even tried copy pasting the code from the examples, to confirm that I didn't miss any details.
I've even tried accessing the layoutData with @UiField(provided=true), with various results, although mostly fails.
When I run the non-UiBinder example it works.
From the behaviour I would assume that it simple doesn't pass argument when adding the child in UiBinder.
-
27 Jan 2012 5:10 AM #2
I had reported margins not working with verticalLayoutContainer, but I think this is the same issue.
http://www.sencha.com/forum/showthre...out-(UiBinder)
-
27 Jan 2012 5:51 AM #3
-
27 Jan 2012 8:05 AM #4
As I wrote I copy pasted the entire code from the example page, so unless it inherits wrongly, it should be the right one. That said, I'd gladly test once more.
-
27 Jan 2012 8:12 AM #5
So you just copied the code?
How does your module file look like? Could you upload the required code somewhere?
-
30 Jan 2012 12:34 AM #6
Module file? If you're refering to the gwt.xml-file I'll gladly copy paste it

I've tried building it with a fresh project (just in case I did something weird and forgot it), using the jar files from your homepage (I use Maven normally) and can confirm it behaves the same way.
If the mediafire upload works there should be a zip file with the entire source at this page:
http://www.mediafire.com/?wpd6msk0m8kunyr
The changes done is:
package changed to the one I use
commented this import: import com.sencha.gxt.explorer.client.model.Example.Detail;
since it's unused and not in my classpath I didn't bother to find it.
And a screenshot of the example. It behaves the same way in Firefox.
borderExample.jpg
-
30 Jan 2012 3:21 AM #7
I found part of the solution to my problems, but not all. Now I found what I was wrong with the non-dynamic version. Simply there's a difference in if my panel is an IsWidget or a ContentPanel. I still cannot configure any layoutData through the UiBinder, but at least now I can configure the other parts.
In my current tests it appears that the child has to be a SimpleContainer for the layout to apply (probably some inheritance of Container, but I didn't test that much), otherwise the layout seems to be ignored, for instance if I have some UiBinder widget that has a ContentPanel as its first child that's a no go.
May I suggest that add{North|West|...}(widget, layout) is changed so it only accepts children where the layout actually works. Or even better: if the widget is an IsWidget, make it work if the first widget will work, and for all other cases wrap the content in SimpleContainer.
Also (logically) collapsible don't work if it's not a ContentPanel, maybe you should have some kind of error/warning message if you try to set collapse to true, but use an incompatible panel.
-
1 Oct 2012 4:54 AM #8
You really need to inherit from com.sencha.gwt.uibinder.UiBinder
You really need to inherit from com.sencha.gwt.uibinder.UiBinder
I had exactly the same problem but as soon as I added
uibinder-bridge-2.4.0.jar to my project
and
added the following line to my get.xml
<inherits name='com.sencha.gwt.uibinder.UiBinder'/>,
it started working.
Cheers,
A.
-
1 Oct 2012 6:47 AM #9
Yes this is mostly the problem when the layoutdata in the ui.xml file is not working. You need to use our custom UiBinder module.
Once GWT 2.5 is out, this will change.
-
21 Mar 2013 5:33 AM #10
This is how really looks example of BorderLayout UiBinder! Any ideas?
Web Application Starter Project.jpg
Thank you for reporting this bug. We will make it our priority to review this report.


Reply With Quote