• Post Reply Bookmark Topic Watch Topic
  • New Topic

Highlight row on value change

 
Mike Panahil
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Limited jsf knowledge here. If I have an ArrayList of Objects rendered in a datatable in a faces jsp page, how can I highlight a row if any value of that row has been changed?

This needs to happen as soon as the value is changed, before �submit� which would update the bean values (submit in my case updates the db).
 
Varun Khanna
Ranch Hand
Posts: 1400
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by GoGoMax:
Limited jsf knowledge here. If I have an ArrayList of Objects rendered in a datatable in a faces jsp page, how can I highlight a row if any value of that row has been changed?

This needs to happen as soon as the value is changed, before �submit� which would update the bean values (submit in my case updates the db).


I would suggest you to highlight row at server side rather than using client side javascript. Doing it at server will give you more control and you will be less dependant upon user environment such as browser setting etc.

If there is a change in value, submit the form -- update the bean value at server -- select the row to highlight.

Now you can see this thread to know how to identify which row to highlight.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!