Honestly,

i think the most flexible solution is to use an js-lib..
e.g.:

creating an js object using some jQuery methods...
as an result you can handle the hover of an table row by simply adding
class 'css_hoverable' to the table ( works also with zebra tables ).... 
and the css controls you presentation..

var HoverTables = {
  storedClass: null,
  init: function(){
    try{
      jQuery("table.css_hoverable tbody tr").hover(
        function(){
          HoverTables.storedClass = jQuery(this).attr('class');
          jQuery(this).attr('class', 'row_hover');
        },
        function(){
         jQuery(this).attr('class', HoverTables.storedClass);
          }     
      );
    }catch(ignore){}
  }
} 


cheers elmar



-----Ursprüngliche Nachricht-----
Von: Christopher Cudennec [mailto:[EMAIL PROTECTED] 
Gesendet: Mittwoch, 15. August 2007 14:05
An: MyFaces Discussion
Betreff: Re: Hightlight a tableRow onMouseOver

Hi Jochen,

you can try tomahawk's dataList for rendering the table's rows instead, it 
gives you more flexibility. Have a look at 
http://myfaces.apache.org/tomahawk/dataList.html. Though, you have to write 
your own code for rendering the table header and for outputting all those TR- 
and TD-tags.

Cheers,

Christopher


Jochen Zink schrieb:
> Hello,
>
> I want to highlight a complete tableRow of a h:dataTable component.
>
> With blank HTML I can use JavaScript like this:
> <table width="100%">
>    <tr class="tableRowNormal" onMouseOver="className='tableRowHighlight'" 
> onMouseOut="className='tableRowNormal'"> 
>       <td>23232323</td>
>       <td>1000</td>
>       <td>Name1</td>
>    </tr>
> </table>
>
> But I don't find anything to address a single whole tablerow with JSF? 
>
> The second think is similar. I want to have a whole tableRow as link. With 
> blank HTML:
> <tr onClick="alert('Submit wird &uuml;ber eine Javascript Methode 
> ausgel&ouml;st...');"> 
>    <td class="fieldvalue">23232323</td>
>    <td>1000</td>
>    <td>Name1</td>
> </tr>
>
> Has anyone some ideas or solutions?
>
> Thanks a lot!
> Regards
> Jochen
> _____________________________________________________________________
> Der WEB.DE SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
> http://smartsurfer.web.de/?mc=100071&distributionid=000000000066
>
>
>   



Reply via email to