Is there a UIBinder dtd or schema anywhere to which we can validate and use
in our IDE for auto-completion?
For more information:
http://code.google.com/p/google-web-toolkit/wiki/UiBinder
Hello all.
I have a question concerning how to access/modify the size of a
DockLayoutPanel's widget outside of the *.ui.xml file in the java code.
For instance, say I have a DockLayoutPanel with a West widget and a Center
widget as follows:
{{{
<g:DockLayoutPanel unit='EM'>
<g:west size='20'>
<layouts:westWidget ui:field='westWidget' />
</g:west>
<g:center>
<layouts:CenterWidget ui:field='centerWidget' />
</g:center>
</g:DockLayoutPanel>
}}}
Is it possible to dynamically change the width of the westWidget somewhere
in the associated java code, or can it only by modified in the *.ui.xml
file.
The problem is, I would like to be able to hide/show the westWidget and
have the centerWidget fill the remaining space dynamically when the app is
running,
but changing the width of westWidget in the java code has no effect on the
width of the West Pane of the DockLayoutPanel that was hard-coded in, there
is a disconnect between them.
Any help would be greatly appreciated.
Sincerely,
George.
Hello all.
I have a question concerning how to access/modify the size of a
DockLayoutPanel's widget outside of the *.ui.xml file in the java code.
For instance, say I have a DockLayoutPanel with a West widget and a Center
widget as follows:
{{{
<g:DockLayoutPanel unit='EM'>
<g:west size='20'>
<layouts:WestWidget ui:field='westWidget' />
I may be missing something but shouldn't the argument to the initWidget
call in _Apply different xml templates to the same widget_
be
{{{
protected FooPickerDisplay(UiBinder<Widget, FooPickerDisplay> binder) {
initWidget(binder.createAndBindUi(this));
first of all thank you guys for the great work!
why is nowhere an example to find from the scratch to html design? i
searching for it very intensive, but iam not founding it...
i am searching for an example where i can embed the xml with html sites for
multiple modules.
i would like to create themes for my gwt app. am i asking on the right
place? i hope so.
@OsorioJaques, we're still stumbling toward just how to use UiBinder
effectively in a themed app. The last example, "Apply Different XML
Templates..." is a hint of how it might be done, though its a bit over
complex.
I expect we'll wind up with widgets that have default UiBinder instances as
final static fields, GWT.created to allow substitutions; and which accept
binder instances as constructor arguments to use instead. Something like:
{{{
class MyWidget {
public interface Binder extends Binder<Widget, MyWidget>{}
private static final DEFAULT_BINDER = GWT.create(Binder.class);
MyWidget() {
this(DEFAULT_BINDER);
}
MyWidget(Binder binder) {
...
}
}
}}}
The ugly bit here is that it would effectively require the themed Widget's
bound fields to be public and non-final, so we'll probably have to teach
UiBinder some new tricks to make it more palatable.
hello, i'm trying to use the "dygger" DialogBox example use-case, which is
just i need.
so first thanks a lot for the example.
My problem is i really dont know how to create the objet. how to declare it.
if i declare a TestDialogBox object in my main ui.xml file .. i got
compilation trouble.
Maybe the thing i dont understand is the @UiFactory.
somebody could explain me what is the meaning of this annotation in this
use case ???
thanks a lot.
roky.
eric.sadou: AFAIK, the DialogBox use case has been fixed so you no longer
need dygger's workaround (HasWidgetsDialogBox)
The @UiFactory tells UiBinder how to "instantiate" a widget (DialogBox in
this case), and dygger made it return 'this' because the "owner class" is
already a DialogBox instance. Without the @UiFactory, UiBinder would
instantiate a new DialogBox or use a @UiField(provided=true) field.
Thanks a lot for a so quick answer. My App is ok now. I found other example
on internet. My PersonalDialogBox is now composite extending (as usual
example in GWT doc) and i created a "normal" ui.xml file.
My Ui Binder is "UiBinder<Widget,PersonalDialogBox> now.
In fact, My initial trouble was to use
initWidget(uiBinder.createAndBindUi(this));
in my constructor ...as i follow doc on GWT website.
But actually i need to remove the initWidget(...) method and just write
uiBinder.createAndBindUi(this);
If somebody could explain when should we have to use it / or not it will be
greatful.
Anyway i post this "solution" as maybe it could help.
I may be a Johnny-come-lately when it come to GWT but coming from a Flex
background, I REALLY would like to see Google put more into this UiBinding
thing. Laying out a UI in Flex is so easy and it's the only thing that
stopping me from coming over to GWT.
I used toe UiBinder once or twice and it was easy enough to understand, but
hard to get a good flow going. Having full content assist for all the
attributes of a control that could be set (other than ui:field) would be
great. Also, having the @UiField generated automatically in the .java file
would be a nice touch.
Looking at how Flex came from just an SDK to an Eclipse plugin to having an
IDE based on developing Flex apps, i'd say that if Google did the same
they'd get a lot more hesitant people (like me) on board quicker.
Note to Google: No shame in following by example if somebody else did it
right.
I'm really excited about starting to use GWT for all my future web app
development.