Re: UiBinder using Element and appendChild(child) possible?

2011-09-28 Thread benneq
Hey,
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  I specified in the GlassPanel.ui.xml ...


On 28 Sep., 09:19, Sudhakar Abraham 
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"
>
>
>
>
>
>
>
>  wrote:
> > Hi,
> > I wanted to create some lightweight Elements using UiBinder. I've
> > created a 'root' Element called GlassPanel:
>
> > (.ui.xml)
> >  > xmlns:g="urn:import:com.google.gwt.user.client.ui">
>
> >         
> >                 
> >         
> > 
>
> > (.java)
> > public class GlassPanel extends UiObject {
> >         interface GlassUiBinder extends UiBinder {}
> >         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)
> >  > xmlns:g="urn:import:com.google.gwt.user.client.ui">
>
> >         
> >                 
> >         
> > 
>
> > 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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: UiBinder using Element and appendChild(child) possible?

2011-09-28 Thread Sudhakar Abraham
No need to appendChild in GlassPanel.  In glassPanel constructor
specify the uiBinder.createAndBindUi(this), it binds the divelement
through UiBinder interface.

S. Abraham
www.DataStoreGwt.com
Persist objects directly in GAE

On Sep 27, 7:42 pm, "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)
>  xmlns:g="urn:import:com.google.gwt.user.client.ui">
>
>         
>                 
>         
> 
>
> (.java)
> public class GlassPanel extends UiObject {
>         interface GlassUiBinder extends UiBinder {}
>         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)
>  xmlns:g="urn:import:com.google.gwt.user.client.ui">
>
>         
>                 
>         
> 
>
> 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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



UiBinder using Element and appendChild(child) possible?

2011-09-27 Thread benjamin_ma...@lavabit.com
Hi,
I wanted to create some lightweight Elements using UiBinder. I've
created a 'root' Element called GlassPanel:

(.ui.xml)







(.java)
public class GlassPanel extends UiObject {
interface GlassUiBinder extends UiBinder {}
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)









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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.