I am guessing this may be a noob question but I am having a very hard time finding an answer.
I have a menu which is populated from an array
<f:selectItems value="#{quizBean.categoryArray}"/>
I need to store the selected menu item in a value in QuizBean that is called tempCategory. I have a getter and setter for tempCategory called setTempCategory(String newValue) and getTempCategory().
I need to fill in the value for the selectOneListbox. quizBean.tempCategory refers to the set method for tempCategory. What would I replace newValue with so that the menu item is sent to the setTempCategory(String newValue) method?
<h:selectOneListbox value="#{quizBean.tempCategory(newValue)}">
<f:selectItems value="#{quizBean.categoryArray}"/>
</h:selectOneListbox> <br/>
<h:commandButton value="Choose Quiz" action="#{quizBean.chooseCategory(quizBean.getTempCategory)}"/>