Thursday, December 16, 2010

Re: execute same code for different widget event handle

Use following,

@UiHandler(("streetName"'somethingelse'))

Mittal

On Dec 16, 8:30 am, Subhrajyoti Moitra <subhrajyo...@gmail.com> wrote:
> a funny workaround.
>
> @UiHandler("streetName")
> void handleStreetNameKeyPress(KeyPressEvent  e) {
>        handleCommonKeyPressEvent(e);}
>
> @UiHandler("streetNumber")
> void handleStreetNameKeyPress(KeyPressEvent  e) {
>     handleCommonKeyPressEvent(e);
>
> }
>
> private void     handleCommonKeyPressEvent(KeyPressEvent e){
>    //some common code..
>
> }
>
> will this do? i am using this way to handle common handler issues.
>
> Thanks,
> Subhro.
>
> On Thu, Dec 16, 2010 at 6:15 PM, pieceovcake <bira...@gmail.com> wrote:
> > this works great
>
> > @UiHandler("streetName")
> > void handleStreetNameKeyPress(KeyPressEvent  e) {
> > // code
> > }
>
> > but i want to execute the same handleStreetNameKeyPress triggered from
> > another field on the page
> > something like this
>
> > @UiHandler("streetNumber")
> > @UiHandler("streetName")
> > void handleStreetNameKeyPress(KeyPressEvent  e) {
> > // code
> > }
>
> > how do i write this?
>
> >  --
> > 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<google-web-toolkit%2Bunsubscribe@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/google-web-toolkit?hl=en.

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

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate