You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Jochen Zink <jo...@web.de> on 2007/08/15 13:29:34 UTC
Hightlight a tableRow onMouseOver
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 über eine Javascript Methode ausgelö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
AW: Hightlight a tableRow onMouseOver
Posted by Elmar Kretzer <e....@symentis.com>.
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:SmutjeJim@gmx.net]
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 über eine Javascript Methode ausgelö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
>
>
>
Re: Hightlight a tableRow onMouseOver
Posted by Christopher Cudennec <Sm...@gmx.net>.
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 über eine Javascript Methode ausgelö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
>
>
>
Re: Hightlight a tableRow onMouseOver
Posted by Mike Kienenberger <mk...@gmail.com>.
For what it's worth:
>From "Mike Kienenberger" <mk...@gmail.com>
Subject Experiences with t:dataTable row clicking, selecting, and highlighting
Date Wed, 14 Mar 2007 18:24:45 GMT
http://mail-archives.apache.org/mod_mbox/myfaces-users/200703.mbox/%3c8f985b960703141124s37a1adadgd075666460a08ac2@mail.gmail.com%3e
On 8/15/07, Jochen Zink <jo...@web.de> wrote:
> 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 über eine Javascript Methode ausgelö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
>
>