Re: SuggestBox does not have an addClickHandler

2010-01-18 Thread Matt Moriarity
I don't think you will be able to use @UiHandler in this case. You
will have to do it the old-fashioned way and do mySearchBox.getTextBox
().addClickHandler(...)

On Jan 16, 8:39 am, Alexander 
wrote:
> Hi there,
>
> as stated at [1] and [2] it is easily possible to add different
> handlers using the @UiHandler annotation for UiBinder based layouts.
> Unfortunately I'm not able to add a click hander to a SuggestBox:
>
>     @UiField(provided = true)
>     SuggestBox mySearchBox;
>
>     @UiHandler("mySearchBox")
>     void handleClick(final ClickEvent e) {
>         this.mySearchBox.setValue("");
>     }
>
> I receive the error message:
>
> Field 'mySearchBox' does not have an 'addClickHandler' method
> associated.
>
> As stated at [3] this is true and I should use getTextBox() first. But
> how can I use the @UiHandler annotation in this case?
>
> BR, Alex
>
> [1]http://code.google.com/webtoolkit/doc/latest/DevGuideUiBinder.html#Si...
> [2]http://code.google.com/p/google-web-toolkit/source/browse/releases/2
> [3]http://google-web-toolkit.googlecode.com/svn/javadoc/2.0/com/google/g...
-- 
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.




SuggestBox does not have an addClickHandler

2010-01-16 Thread Alexander
Hi there,

as stated at [1] and [2] it is easily possible to add different
handlers using the @UiHandler annotation for UiBinder based layouts.
Unfortunately I'm not able to add a click hander to a SuggestBox:

@UiField(provided = true)
SuggestBox mySearchBox;

@UiHandler("mySearchBox")
void handleClick(final ClickEvent e) {
this.mySearchBox.setValue("");
}

I receive the error message:

Field 'mySearchBox' does not have an 'addClickHandler' method
associated.

As stated at [3] this is true and I should use getTextBox() first. But
how can I use the @UiHandler annotation in this case?

BR, Alex

[1] 
http://code.google.com/webtoolkit/doc/latest/DevGuideUiBinder.html#Simple_binding
[2]
http://code.google.com/p/google-web-toolkit/source/browse/releases/2.0/user/test/com/google/gwt/uibinder/test/client/HandlerDemo.java?r=6557
[3] 
http://google-web-toolkit.googlecode.com/svn/javadoc/2.0/com/google/gwt/user/client/ui/SuggestBox.html
-- 
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.