I tried with Jquery but i meet a difficulty because the highlight on the 
selected table row is not permanent, the display is during less than one second.
I think that is linked to the ActionLink which triggers the highlight.
When i try with an ActionButton, it's the same behavior.

When i use a normal Button in a form (not in the table), the highlight is good 
and permanent.
Do you have an idea ? Here is my code below

jQuery script
-------------
editEntity is the class attribute added on the ActionLink (anormal display)
button2 is the class attribute added on the Button (normal display)

jQuery(".editEntity").click(function(){
     jQuery(this).parents("tr").css("background-color","#C73333");
     jQuery(this).parents("tr").css("color","white");
})

jQuery(".button2").click(function(){
     jQuery("h2").css("background-color","yellow"); 
})

Java Controller
---------------
/*Action Link */
@Bindable protected ActionLink editLink    = new ActionLink("edit", "Modifier 
un 
Site", this, "onEdit");
editLink.setAttribute("class","editEntity");
links = new AbstractLink[] { editLink };
column.setDecorator(new LinkDecorator(table, links, "id"));
table.addColumn(column);

/*Button*/
Button ajaxButton = new Button("AJAX");
ajaxButton.setAttribute("class","button2");
form.add(ajaxButton); 

NB : I can't put a normal Button in the table because this one must be linked 
to 
a Listener to edit the row data in a form (so ActionButton or ActionLink)

Reply via email to