Hi,
Iam very new to the
JSF, i developed the page with two dropdown boxes(using selectOneMenu tags).my aim is when the user select the value of the first dropdown,the second dropdown should show the coresponding values for the first drop down selected value. for this i used valueChangeListener attribute and i wrote some methode to add coresponding values to the list for the specific selection. if i clicks on the submit button first time it is working fine and going to success page.second time it is throwing some "java.util.NoSuchElementException". i am using <managed-bean-scope>request</managed-bean-scope> in faces-conifg.xml,insted of this if i use <managed-bean-scope>session</managed-bean-scope> it is working fine but second dropdown is not refreshing. it is showing all the values.not showing only the values for the sfecific selection. my jsf code is :
<h:outputText value="Project:" />
<h:selectOneMenu id="projectName" value="#{projectDetails.projectName}" styleClass="ComboBoxBig"
valueChangeListener="#{projectDetails.projectChanged}" immediate="true" onchange="submit()">
<f:selectItems value="#{projectDetails.allProjects}" />
</h:selectOneMenu>
<h:outputText value="Location:" />
<h:selectOneMenu id="locationName" value="#{projectDetails.locationName}" styleClass="ComboBoxBig" >
<f:selectItems value="#{projectDetails.allLocations}" />
</h:selectOneMenu>
<h:commandButton id="submit" action="#{projectDetails.action}" value="Submit"/>
please suggest me to solve this problem. and please refer some documents on jsf to learn quickly.
Thanks&Regards!
Naresh kumar Kapilavai.