Wednesday, September 8, 2010

ComplexPanel and KeyPressHandler

Hi,

I'm trying to use GWT to create a html5 application (using UIBinder to
connect to specific html templates). This works wonder, but for some
reason I can't get any KeypressHandlers working when adding widgets to
a ComplexPanel. When using a SimplePanel it's working like intended,
but then I get this ugly <div> in the html.

Is there something in a complexPanel I need to enable to make
keyboardevents work on children?

The structure right now looks something like this:

EntryPoint
- TestBase (SimplePanel/ComplexPanel)
- TestInput (FocusWidget with element set to "input")

I'm testing keypressevents both inside the TestInput class and in the
TestBase class, neither of the events fires when using the
ComplexPanel.

As a sidenote, when using the ComplexPanel, I set the element to
RootPanel.get().getElement() (IE the <body> of the html page), will
this be the reason?

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