The events don't get hooked up if you use something like setInnerHTML
to add them, you have to use the GWT add methods.  So you should be
using something like body.add(hPanel).

On Apr 9, 7:24 am, lee <libi...@gmail.com> wrote:
> hi all,
>
> i'm using uibinder to display a button in the sample mail application
> that comes along with gwt.
> like
>
> <g:center>
>       <g:ScrollPanel>
>         <g:HTML styleName='{style.body}' ui:field='body'
> wordWrap='true'/>
>       </g:ScrollPanel>
> </g:center>
>
> from my java code i'm inserting the button as below.
>
> HorizontalPanel hPanel = new HorizontalPanel();
> hPanel.setSpacing(10);
>
> final TextBox textBox = new TextBox();
> textBox.setText("text box");
>
> hPanel.add(textBox);
> Button normalButton = new Button("normal",
> new ClickHandler() {
> public void onClick(ClickEvent event) {
> Window.alert("got the call");
>
> }
> });
>
> normalButton.ensureDebugId("cwBasicButton-normal");
> hPanel.add(normalButton);
>
> body.setInnerHTML(item.body.toString());
>
> is there something wrong in what i'm doing ?
> the button gets displayed but the event is not firing.!!
>
> please suggest.

-- 
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-tool...@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.

Reply via email to