This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

<hx:datatable using javascript to set a selected rows background color  RSS feed

 
Dan MacLeod
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know there has been a lot of topics on this subject, but I'm either dumb or just missing something.
Here's my situation. I have a <hx:dataTableEx that uses a <hx:commandExRowAction> to get the selected row data and store it in sessinScope variables.
I need a way to change the background color of the selected row. I'd like to use JavaScript because I don't want to add checkboxes to my table. Does anyone have an example of a <hx:dataTableEx calling JavaScript to change the background color of the selected row? If there is a better way to do this, I'm open to suggestions.

thanks
Dan MacLeod

 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSF generates HTML only.
JS intercepts on HTML only.

So open the JSF page in your favourite browser, view the generated HTML output and base your JS code on that.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!