Wednesday, February 1, 2012

DOM events don't work in nested uibinder

Hi All,

With respect to GWT 2.4

I have to add many objects of a uibinder widgets(e.g.inner Uibinder) at a particular location in another uibinder(e.g. outer uibinder).
So the DOM events associated with fields in inner uibinder does not work.

Here is the clear picture,

html:-
<div id="myHtml"></div>


outer uibinder

<g:HTMLPanel ui:field="outerHtmlPanel"> 
     <div ui:field="placeholder">  </div>
</g:HTMLPanel> 

inner uibinder

<g:HTMLPanel ui:field="innerHtmlPanel"> 
     <g:Button ui:field="innerBtn"></g:Button>
</g:HTMLPanel> 

Java code for inner ui binder

@uifield Button innerBtn;

inner() {
 innerBtn.addClickHandler() {
    // some event
}
}



Now,

onModuleLoad() {
  
Outeruibinder out = new Outeruibinder();   
out.placehoplder.appendChild(new innerUiBinder());
out.placehoplder.appendChild(new innerUiBinder());
out.placehoplder.appendChild(new innerUiBinder());

RootPanel.get("myHtml").add(out);
}


Now, while rendering, three innerUiBinder objects appear properly but the event associated with button in innerUiBinder does not fire.

Can someone pls guide on this.

Thanks
Deepak

--
Deepak Singh

--
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