Title: Message
 
 
I would like to see both onclick, onmouseover, and onmouseout added; for TR via a TableTag attribute and for TD via ColumnTag. 
 
The attribute would not be output directly, but rather, taken as the name of a _javascript_ function that will be invoked.
The function would pass the HTML element (this) that is being highlighted, and the value(s) of the cell(s).
 
So if a user says: 
<display:table .. rowOnclick="chooseRow">
<display:column property="fname" cellOnmouseover="highlightColumn"/>
the tag would output: 
<tr >   
    <td  >
 
you can then write a nifty js function like:
 
// Submit the page when the user selects a row  -- ignores uninteresting parameters
function chooseRow( selectedTR,  companyName, companyId ){
    form.companyId.value = companyId;
    form.submit();
}
 
var currentHighlighted = null;
// highlight something useful
function highlightColumn( selectedTD,  title, value){
    setCurrentSomething(value);
    if ( currentHighlighted != null ){    currentHighlighted.className = ''; }
    selectedTd.className = 'highlighted';
    currentHighlighted = selectedTD;
}
 
Something like this would be very flexible.
 
-----Original Message-----
From: Benjamin Simpson [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 23, 2003 8:30 PM
To: [EMAIL PROTECTED]
Subject: [displaytag-devel] on mouse over

Guys,

 

I really love this tag.  I am beating the heck out of it at my current consulting gig and very proud of the work that Fabrizio has done.

 

As part of that, I see the need to make an onMouseOver attribute for the column tag.  Does anyone object?

 

Ben

 

Reply via email to