I think you didn't understand what I meant. I want to create a
GlassPanel as it is above (one div in another div). And then I'd like
to use this Panel in another UiBinder to add a child Element to it.
The Problem is: When I do write the code as above, UiBinder will not
say 'append' the new Child to the Panel. But instead it replaced the
complete innerHTML. !!! here's the difference to you post !!! -> This
behavior deletes the <div> I specified in the GlassPanel.ui.xml ...
On 28 Sep., 09:19, Sudhakar Abraham <s.abra...@datastoregwt.com>
wrote:
> No need to appendChild in GlassPanel. In glassPanel constructor
> specify the uiBinder.createAndBindUi(this), it binds the divelement
> through UiBinder interface.
>
> S. Abrahamwww.DataStoreGwt.com
> Persist objects directly in GAE
>
> On Sep 27, 7:42 pm, "benjamin_ma...@lavabit.com"
>
>
>
>
>
>
>
> <benjamin_ma...@lavabit.com> wrote:
> > Hi,
> > I wanted to create some lightweight Elements using UiBinder. I've
> > created a 'root' Element called GlassPanel:
>
> > (.ui.xml)
> > <ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
> > xmlns:g="urn:import:com.google.gwt.user.client.ui">
>
> > <div ui:field="panel">
> > <div style="someStyles..." />
> > </div>
> > </ui:UiBinder>
>
> > (.java)
> > public class GlassPanel extends UiObject {
> > interface GlassUiBinder extends UiBinder<DivElement, GlassPanel> {}
> > private static GlassUiBinder uiBinder =
> > GWT.create(GlassUiBinder.class);
>
> > @UiField DivElement panel;
>
> > public GlassPanel() {
> > setElement(uiBinder.createAndBindUi(this));
> > }
>
> > }
>
> > There will now be several other Elements that should use this one as
> > their 'root'. I want to do something like this:
>
> > (.ui.xml)
> > <ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
> > xmlns:g="urn:import:com.google.gwt.user.client.ui">
>
> > <e:GlassPanel>
> > <span ui:field="messagePanel"/>
> > </e:GlassPanel>
> > </ui:UiBinder>
>
> > It works if I say that GlassPanel.java implements HasHTML. But then
> > UiBinder uses the setHTML method which kills the inner div in my
> > GlassPanel panel. Instead it would be cool if it could call
> > 'appendChild()' on my GlassPanel panel and simply add the additional
> > Element. Is it possible?
> > Maybe somehow using @UiChild ?!
>
> > I'm using Eclipse 3.7 and GWT 2.4.
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
No comments:
Post a Comment