Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Changing the value of a rich:comboBox

 
daphna deutsch
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I'm quite new to JSF, so maybe my question is really simple.

I’m using a table to display list of data. When clicking on one of the row, I display an hidden div that contains rich:comboBox.
I want that the value of the rich:comboBox (the one that is no selected) will be change from row to row.
So – when I display the div, using java script, I also set the value of the component.
However, this has no affect on the component…

 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSF runs at the server side and produces HTML.
JS runs at the client side and intercepts on HTML DOM.

So, whenever you want to write a JS function, you should not look at the JSF source code, but look at its generated HTML output. Base your Javascript on this. The HTML element in question may not have a 'value' attribute, for example a <select> element. If you stucks in this, try a HTML/Javascript forum. The JSF code is irrelevant here.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic