aspose file tools*
The moose likes JSF and the fly likes Changing the value of a rich:comboBox Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Changing the value of a rich:comboBox" Watch "Changing the value of a rich:comboBox" New topic
Author

Changing the value of a rich:comboBox

daphna deutsch
Greenhorn

Joined: Nov 17, 2005
Posts: 17
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

Joined: Oct 08, 2006
Posts: 2458
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Changing the value of a rich:comboBox
 
Similar Threads
richfaces :comboBox defaultLabel, required=false question
rich:comboBox fails to reRender due to rich:ajaxValidator
rich:comboBox valueChangeListener is not working
Dynamically deciding either to show or hide modalPanel
rich:comboBox setting a default value