How to using Jquery to call GWT binding event

I have a GWT demo project that includes a data table with 3 columns and 5 rows. i used gwt to implement:

table.addTableListener( new TableListener(){ public void onCellClicked(SourcesTableEvents sender, int row, int cell) { demoFunc(); } });

How can i create a html button and using jquery to call "onCellClicked" event.

<input type="button" id="button1" value="click here"/ >


$("#button1").click(function(){ //implement here to call "onCellClicked" event. });

-------------Problems Reply------------

Have a look at gquery, a jquery port of GWT: Haven't tested it beyond GWT 1.5.

Otherwise you'll need to do some JSNI, wrap a javascript function inside JSNI tags and call the javascript either using GWT or using jQuery or whichever way you want.

See the docs:

Category:jquery Views:1 Time:2011-05-23
Tags: jquery gwt

Related post

  • jQuery - How do I bind events to hidden elements that will be shown later? 2011-04-13

    I am trying to attach 'click' events to all elements of a particular class. The problem is some of the elements are on a tab that is hidden (display: none) at the time that the event is bound. (.bind()). It seems that when these elements are shown th

  • jQuery, associative array and binding events 2012-01-31

    I would like to bind the same event to 3 checkboxes but with a different target each time: var checkboxes = { 'selector1' : 'target1', 'selector2' : 'target2', 'selector3' : 'target3', }; for (selector in checkboxes) { var target = checkboxes[selecto

  • jquery bind event depends on situation 2012-04-02

    I want to know about jquery. Can we bind event depending on the variables / situation / another event? for example, If the var X is 0, a div could be clicked, meanwhile if the var X is 1, the same div could not be clicked. I made this jsfiddle http:/

  • How to call jquery trigger from gwt? 2010-02-23

    public static native void doConnect() /*-{ $wnd.jQuery(document).trigger('connect', { jid: 'sss', password: 'sss' } ); }-*/; i tried the above ,but there is no error in firebug or gwt hosted mode console(so i cannot know whether the code is success o

  • What is the correct way to bind events in jQuery? 2009-11-10

    For example in php I have a list of clients: foreach($clients as $client) echo '<li id="client_'.$client->id.'">' . $client->name . '</li>'; What is the correct way to bind a click event to each list item w/o using onclick="my_funct

  • Binding event handlers to specific elements, using bubbling (JavaScript/jQuery) 2010-03-07

    I'm working on a project that approximates the functionality of Firebug's inspector tool. That is, when mousing over elements on the page, I'd like to highlight them (by changing their background color), and when they're clicked, I'd like to execute

  • How to make jquery bind event work 2010-04-05

    For some reason my bind events won't work. You can see my code here: Clicking on 'Add gadget' or the 'Remove gadget' button should be firing alerts but nothing happens. Any ideas ? --------------Solu

  • How does jquery-ui know how to bind event callbacks supplied as init options? 2010-08-14

    How does jquery-ui knows to bind callbacks passed as init options? I'm thinking the answer is somewhere in the $.widget.bridge method (ln 71) but I'm not entirely sure what's going on there. An example of what I'm talking about is something like the

  • Binding events in jquery (double event on click-) 2011-02-28

    I'm creating a tax calculator and have some problems with binding events. There are five fields: A text field. User has to type his city and the script assigns a number to text value. For example, you type "New York", and when you click "Go!", the sy

  • jQuery bind event listener before another 2011-05-17

    Using the prettyPhoto plugin to open modal-style content containers, and trying to integrate with Google Analytics' Event Tracking to track when videos get opened. Trouble is, when I $('a.videoClickListener').click(function(event){ console.log('here'

  • jQuery's delegate() does not bind events for AJAX loaded content 2011-07-04

    I want to use jQuery's .delegate() method as I've read it performs much better than .live(). However, when I use .delegate() it doesn't bind events to the ajax loaded content. Can anyone help me get .delegate() working? Or am I stuck using the slower

  • jQuery 1.6.2 bind no longer functioning with drag events? 2011-08-23

    I am trying to use .bind() with 'dragenter', 'dragover', and 'drop' so I can drag a file from my desktop to my browser. Please see attached jsfiddle. $(function(){ function dragenter(e) { e.stopPropagation(); e.preventDe

  • jQuery - Bind action to parent form, determine what child triggered the bind event 2011-09-07

    I have a form that has multiple input fields. I'm applying a bind() to this form as so: $("#form-id").bind('keyup change', function(e) { //Run some other code alert('here'); }); I would like to determine the ID of which form field triggered the bind

  • Binding events to a jquery object not working 2011-10-12

    I've been trying to bind events to jquery objects (code below) but its really not working at all. Could somebody offer me a suggestion? Thanks! var img = thumbnail[0].appendChild(document.createElement('img')); img.className = 'smallboard'; img.src =

  • Backbone not binding events to jQuery Popover 2011-11-02

    This question seems similar to those asked in a few other posts: here and here. I feel like I understand the concept, but I'm still having issues. I am using the Twitter Bootstrap stuff for javascript popovers; the popover is where I want to bind eve

  • Does binding events to elements in jQuery multiple times have a knock on effect? 2011-12-02

    If I have the below code, textboxes of class serial will be bound to the events more than once if the new serial button is pressed multiple times. Will this hinder performance or does jQuery only register events once even if the bind method is called

  • jQuery - insert form into DOM, then bind events, then return to previous state 2012-01-09

    I'm trying to make an editable table for a tournament using jQuery and ajax. The present table structure is as follows: <table> <tr id="result-243"> <td class="name">Somebody</td> <td class="score_1">9.0</td> <t

  • bind event before append jquery object 2012-01-27

    How can I bind event to a not jet printed jquery object? Example my div is: var $div = $("<div>my div</div>"); I want to bind a click to this not rendered div and then print it on DOM, something like: ${alert("hello")}

  • jQuery.bind() events on plain Javascript objects 2012-02-01

    Is it ok to bind jQuery events to plain, non-DOM Javascript objects: var myobject = {}; $(myobject).bind("foobar", function() { alert("daa"); }); $(myobject).trigger("foobar"); What are the implications for Garbage collection (no new references creat

Copyright (C), All Rights Reserved.

processed in 0.182 (s). 11 q(s)