You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Piekorz Martin <pi...@primion.de> on 2008/05/26 17:04:46 UTC

[TRINIDAD] How to highlight a table row on mouseover?

Hello @ all,

I'd like to highlight a table row (tr-tag) on the mouseover event. Does someone know how to do this?
Perhaps with help of css? Or is this supported by Trinidad tags?
Thank a lot of.
Kind Regards
Martin

RE: [TRINIDAD] How to highlight a table row on mouseover?

Posted by James Clinton <Ja...@patsystems.com>.
See example here:

http://www.irian.at/myfacesexamples/openDataTable.jsf;jsessionid=E845263
0C31AA4A1534EA1C360705913

 

________________________________

From: Piekorz Martin [mailto:piekorz@primion.de] 
Sent: Monday, May 26, 2008 4:05 PM
To: users@myfaces.apache.org
Subject: [TRINIDAD] How to highlight a table row on mouseover?

 

Hello @ all,

 

I'd like to highlight a table row (tr-tag) on the mouseover event. Does
someone know how to do this?

Perhaps with help of css? Or is this supported by Trinidad tags?

Thank a lot of.

Kind Regards

Martin


AW: [TRINIDAD] How to highlight a table row on mouseover?

Posted by Döring Markus <Ma...@tcc-products.de>.
Hi Martin,

you can do this by Trinidad skinning.

Just put

af|table::content tr:hover af|column::cell-text {background-color:#FF0000;}

into your trinidad skin file.

If you use cell-banding you can define different hover-color for the banding rows with

af|table::content tr:hover af|column::cell-text-band {background-color:#FF3333;}

 

Regards

Markus Döring

 

Von: F.P.G.Segers@delagelanden.com [mailto:F.P.G.Segers@delagelanden.com] 
Gesendet: Dienstag, 27. Mai 2008 07:26
An: users@myfaces.apache.org
Betreff: RE: [TRINIDAD] How to highlight a table row on mouseover?

 

Hi Martin,

 

I put together a simple example to show you how you can do it.

It is just plain HTML, but you can put the mouse event handler attributes on a <trh:rowLayout>.

 

Good luck!

 

Freek Segers

 

---- Cut here ----

 

<html>

            <head>

                        <style type="text/css">

                                   tr.myTableRow {

                                               background-color: #faa;

                                               height: 30px;

                                   }

                                   tr.tableRowHover {

                                               background-color: #aaf;

                                   }

                        </style>

                        

                        <script language="javascript">

                                   function highlightRow(row) {

                                               row.previousClassName = row.className;

                                               row.className += " tableRowHover";

                                   }

                                   

                                   function unhighlightRow(row) {

                                               row.className = row.previousClassName;

                                   }

                        </script>

            </head>

            <body>

                        <table style="width: 50%;">

                                   <tr class="myTableRow" onmouseover="highlightRow(this)" onmouseout="unhighlightRow(this)">

                                               <td>foo</td>

                                               <td>bar</td>

                                   </tr>

                                   <tr class="myTableRow" onmouseover="highlightRow(this)" onmouseout="unhighlightRow(this)">

                                               <td>foo</td>

                                               <td>bar</td>

                                   </tr>

                        </table>

            </body>

</html>

 

---- Cut here ----

 

-----Original Message-----
From: Piekorz Martin [mailto:piekorz@primion.de] 
Sent: maandag 26 mei 2008 17:05
To: users@myfaces.apache.org
Subject: [TRINIDAD] How to highlight a table row on mouseover?

 

Hello @ all,

 

I'd like to highlight a table row (tr-tag) on the mouseover event. Does someone know how to do this?

Perhaps with help of css? Or is this supported by Trinidad tags?

Thank a lot of.

Kind Regards

Martin

 
================================================
The information transmitted via this e-mail is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material.  Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.

RE: [TRINIDAD] How to highlight a table row on mouseover?

Posted by F....@delagelanden.com.
Hi Martin,

 

I put together a simple example to show you how you can do it.

It is just plain HTML, but you can put the mouse event handler
attributes on a <trh:rowLayout>.

 

Good luck!

 

Freek Segers

 

---- Cut here ----

 

<html>

            <head>

                        <style type="text/css">

                                   tr.myTableRow {

                                               background-color: #faa;

                                               height: 30px;

                                   }

                                   tr.tableRowHover {

                                               background-color: #aaf;

                                   }

                        </style>

                        

                        <script language="javascript">

                                   function highlightRow(row) {

                                               row.previousClassName =
row.className;

                                               row.className += "
tableRowHover";

                                   }

                                   

                                   function unhighlightRow(row) {

                                               row.className =
row.previousClassName;

                                   }

                        </script>

            </head>

            <body>

                        <table style="width: 50%;">

                                   <tr class="myTableRow"
onmouseover="highlightRow(this)" onmouseout="unhighlightRow(this)">

                                               <td>foo</td>

                                               <td>bar</td>

                                   </tr>

                                   <tr class="myTableRow"
onmouseover="highlightRow(this)" onmouseout="unhighlightRow(this)">

                                               <td>foo</td>

                                               <td>bar</td>

                                   </tr>

                        </table>

            </body>

</html>

 

---- Cut here ----

 

-----Original Message-----
From: Piekorz Martin [mailto:piekorz@primion.de] 
Sent: maandag 26 mei 2008 17:05
To: users@myfaces.apache.org
Subject: [TRINIDAD] How to highlight a table row on mouseover?

 

Hello @ all,

 

I'd like to highlight a table row (tr-tag) on the mouseover event. Does
someone know how to do this?

Perhaps with help of css? Or is this supported by Trinidad tags?

Thank a lot of.

Kind Regards

Martin



================================================
The information transmitted via this e-mail is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material.  Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.