Skip to main content

how do you get the onclick envent of dojo table or etable ?

7 replies [Last post]
markshen
Offline
Joined: 2007-02-01

how do you get the onclick envent of dojo table or etable ?

if you know organizations or article or chinese learning Forum about this topic ,please tell me ,thanks

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
gmurray71
Offline
Joined: 2003-07-31

Currently the Dojo table isn't wired to publish jMaki events when the rows are selected though we could do so if you are interested. I believe Dojo specific events are emitted.

The Dojo Etable publishes events on edit to the topic the widget is mapped to (by default this is /dojo/etable)

The payload of the events is as follows:

{src: uuid, column:column, row: row, value: value}

Where src is the unique id of the widget, column is the column number, row the row number, and value is the updated value.

to add a listener for these events you add subscriber for the /dojo/etable events.

examle:

You can also us jMaki Glue to have a more centralized location for your event handlers. Find out more at: https://ajax.dev.java.net/glue.html

We do have one developer that on jMaki that speaks Chinese. If you post questions in Chinese I can point him at it.

markshen
Offline
Joined: 2007-02-01

you provides a method to obtain the update event in the etable,but i need the onclick event,so i try to add code in the file component.js:

onDataToggle: function(/* object */obj){
// summary
// Stub for onDataToggle event.
alert("onDataToggle");
},

so it can make me to obtain the onclick event

gmurray71
Offline
Joined: 2003-07-31

You could also add a dojo event listener to call your desired events or publish a jmaki event when the toggle happens as well. If this work for you that is great.

We will be updating this widget in the next reelase to have more events exposed.

extazia
Offline
Joined: 2007-04-17

i have the same question, but i'm a beginer, is it possible to have an example ?

gmurray71
Offline
Joined: 2003-07-31

We have 2 samples that provide a way to click on an event and publish events to other widgets. See the RSS Data into Table example at:

https://ajax.dev.java.net/samples/samples.html#rss-data

or the Craig List Mashup at:

https://ajax.dev.java.net/samples/samples.html#cl-mashup

These samples are both pretty small and easy to follow.

-Greg

extazia
Offline
Joined: 2007-04-17

thank you very much to have answered me so quickly
:) i'll look at these sample ;)

extazia
Offline
Joined: 2007-04-17

ok, so i looked at your sample,
but i don't know how to solve my problem

i'll explain, i have a tree and 2 tables on my page,
and when i click on the tree i want to refresh my first table with other values, and when i click or make a selection on the table, the seconde table will show items concerning the selection you have done in the first table.

so your sample show how to do but only in a container with a link and a web page,
how can i do this with table ?

sorry for my bad english
and thank you for you attention ;)