Why would you need to work directly with html tags with GWT? You
should do it with Javascript.

You just define your own class called keyboard and make it inherit
from another component, like a Composite or a Flowpanel (so you can
put whatever you want inside it) then you can attach EventHandlers to
handle events such as keyboard presses and then check to see if the
key pressed was indeed the character '2'. I haven't played with
keyboard events in GWT so I'm unsure if it the EventHandler will fire
for '2' pressed outside of that panel. If it only fires when the focus
is on the panel then maybe your desired functionality requires to
handle that event regardless of where the focus is on the page. You
can do that by putting the eventhandler on a top level component that
encompasses the entire page. There are other ways of doing this too if
you think like a JS programmer. Upon this eventhandler being fired you
would just set your keyboard panel to have focus.

Cake, with GWT.

Hope this helps.

On Jul 10, 11:51 am, circuit <[email protected]> wrote:
> How can I define a custom html tag with user defined attributes...
>
> e.g.
> <keyboard id="keyboardElement">
>     focusKey='2',
>     highlightClass='keyHighlight'
>  </keyboard>
>
> ON defining a tag like the above, I can see the attributes
> interpretted as pure text using GWT. This is not the case if I simply
> use the browser (without using GWT).
>
> Any ideas what can do to make this work...
>
> Thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to