VKI_attach = function(elem) { ...... } try to change the name of the function to something like function myKeyBoard(elem){...} Then, in your gwt java class, after the code is injected, call to the method myMethodCall. public final native void myMethodCall(Elem oneElem) /*-{
$wnd.myKeyBoard(oneElem);
}-*/;My 2 cents,Adolfo
2012/3/20 dvarrin <daniel.varrin@gmail.com>
How can I do the call to the VKI_attach(elem) function with JSNI?
I tried to write $wnd.VKI_attach(name), but I'm getting an error
message telling that VKI_attach is not a function.
On Mar 20, 5:46 pm, Thomas Broyer <t.bro...@gmail.com> wrote:
> On Tuesday, March 20, 2012 5:41:19 PM UTC+1, dvarrin wrote:
>
> > Hi,
>
> > I want to use a virtual keyboard for some input fields on a web page
> > of my GWT website. In a normal HTML page, I would need to do the
> > following:
>
> > <html>
> > <head>
> > <script type="text/javascript" src="keyboard.js" charset="UTF-8"></
> > script>
> > <link rel="stylesheet" type="text/css" href="keyboard.css">
> > </head>
>
> > <body>
> > <input type="text" value="" class="keyboardInput">
> > </body>
>
> > (required files are available here:
> >http://www.greywyvern.com/code/javascript/keyboard)
>
> > There is a javascript file and style sheet to include on the page, and
> > then all the input fields on which I want a virtual keyboard to be
> > assgned, I've to set their class to "keyboardInput".
>
> > I've added the keyboard.js and keyboard.css to the html page in my
> > application and then in the class creating the view I'm using:
>
> > <nameOfField>.setStyleName("keyboardInput");
>
> > Then the script should add the virtual keyboard image next to each
> > field of the class "keyboardInput".
>
> > when I check the result page, the field has is of the correct class,
> > and I've added an alert in the keyboard.js script and it is executed,
> > but no virtual keyboard image is displayed next to the field.
>
> > Any idea?
>
> See "Advanced Stuff" on the page you linked to: the script runs at
> window.onload, and GWT code can run past this event. You'd have to call the
> VTI_attach() function via JSNI, passing myWidget.getElement() as the
> argument.
--
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.
El precio es lo que pagas. El valor es lo que recibes.
Warren Buffet
--
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