Thank you tonio, this is the idea I have done.
----- Message d'origine ----
De : Tonio Caputo <[EMAIL PROTECTED]>
À : rahmoune patrick <[EMAIL PROTECTED]>
Cc : [email protected]
Envoyé le : Mardi, 25 Juillet 2006, 12h23mn 23s
Objet : Re: Datatable and highlighting
De : Tonio Caputo <[EMAIL PROTECTED]>
À : rahmoune patrick <[EMAIL PROTECTED]>
Cc : [email protected]
Envoyé le : Mardi, 25 Juillet 2006, 12h23mn 23s
Objet : Re: Datatable and highlighting
Hi Patrick,
I use the _javascript_ I send you below, hope it helps.
I know there is a MyFaces Extension that let you
set the onmouseover event for rows, but I don't
remember the exact name.
dt-row-hover -> is my CSS class for highlighting a row.
comp -> is the table row, or whatever component you like
I am not a _javascript_ expert, but I may say a dummy
_javascript_ user, so I won't be able to help you much more.
Hope it helps as it is, it works for me.
Tonio.
//------------------------------------------------------------------
// Provide hover and click effect to entire table rows.
// Usage:
// <table class="grid">
// <tr href="" >
// ...
//-----------------------------------------------------------------
function rowHover(comp)
{
comp.oldClassName = comp.className;
comp.className = 'dt-row-hover';
comp. {
this.className = this.oldClassName;
}
}
On Mon, 2006-07-24 at 21:43 +0000, rahmoune patrick wrote:
> Hi all,
>
> I'm facing a problem with t:dataTable and highlighting
>
> I have a t:dataTable with
> rowClasses="standardTable_Row1,standardTable_Row2" and would like to
> add highlighting
> when the mouse goes over every row.
>
> My first idea was to add some _javascript_ on the onMouseOver/onMouseOut
> that changes the css class.
>
> The pb in that I'm unable to restaure the old css class.
>
> Another bad idea was to find a place to store the old css class name
>
> Something like
>
> rowOnMouseOver="this.title = this.className;
> this.className='highlighted';"
> rowOnMouseOut="this.className = this.title;"
>
> It works but a tooltip is displayed with the css class name :-).
>
> Does someone have this problem? Do I have to store this in something
> like a hashmap index by the TR, or an array with index? How to
> generate the index?
>
> Thank you for any help.
>
> patrick
>
I use the _javascript_ I send you below, hope it helps.
I know there is a MyFaces Extension that let you
set the onmouseover event for rows, but I don't
remember the exact name.
dt-row-hover -> is my CSS class for highlighting a row.
comp -> is the table row, or whatever component you like
I am not a _javascript_ expert, but I may say a dummy
_javascript_ user, so I won't be able to help you much more.
Hope it helps as it is, it works for me.
Tonio.
//------------------------------------------------------------------
// Provide hover and click effect to entire table rows.
// Usage:
// <table class="grid">
// <tr href="" >
// ...
//-----------------------------------------------------------------
function rowHover(comp)
{
comp.oldClassName = comp.className;
comp.className = 'dt-row-hover';
comp. {
this.className = this.oldClassName;
}
}
On Mon, 2006-07-24 at 21:43 +0000, rahmoune patrick wrote:
> Hi all,
>
> I'm facing a problem with t:dataTable and highlighting
>
> I have a t:dataTable with
> rowClasses="standardTable_Row1,standardTable_Row2" and would like to
> add highlighting
> when the mouse goes over every row.
>
> My first idea was to add some _javascript_ on the onMouseOver/onMouseOut
> that changes the css class.
>
> The pb in that I'm unable to restaure the old css class.
>
> Another bad idea was to find a place to store the old css class name
>
> Something like
>
> rowOnMouseOver="this.title = this.className;
> this.className='highlighted';"
> rowOnMouseOut="this.className = this.title;"
>
> It works but a tooltip is displayed with the css class name :-).
>
> Does someone have this problem? Do I have to store this in something
> like a hashmap index by the TR, or an array with index? How to
> generate the index?
>
> Thank you for any help.
>
> patrick
>

