Re: Adding onclick to row in Grid component

2009-01-21 Thread Thiago H. de Paula Figueiredo
Em Wed, 21 Jan 2009 15:16:45 -0300, Jonathan O'Connor  
 escreveu:



Hi,
I have a grid, and I want the user to be able to click on a row to  
select it.
I know I can add a link to each cell, but that's not very nice, as the  
link only works if you click on text, and there could be plenty of  
whitespace in the row.


Maybe you could build a mixin that, after Form generates its content, you  
can alter the DOM to do that. Or try Prototype's event handling services:


Event.observe(yourTrElement, 'onclick', function() {
// your onclik actions
});

(This Javascript code was copied and adapted from a recent Lubor Gajda  
message. Kudos to him!).


--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Adding onclick to row in Grid component

2009-01-21 Thread Jonathan O'Connor

Hi,
I have a grid, and I want the user to be able to click on a row to 
select it.
I know I can add a link to each cell, but that's not very nice, as the 
link only works if you click on text, and there could be plenty of 
whitespace in the row.


I see there is a GridRows component, which is part of each Grid, but the 
documentation on the GridRows component has no example. From memory of 
Tap3, I seem to remember building up a table using underlying 
components. Do I need to that here too?


Thanks,
Jonathan

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org