Hello, Please, how can I get the selected value from a scroll down list (it's a collection of values extracted dynamically : <html:select property="selectedItem"> <html:optionsCollection name="collection" /> </html:select>
and submit it to another action?? (the problem is that I can extract the value and may pass it but I'm constrained to submit my form to an action which takes care of extracting those values loaded into the scroll down menu, that's why even by clicking on submit nothing will change and the form will reloed itself). here is the code: changeFilter.jsp <html:form action="/changesFilterForm" > <html:select property="selectedItem"> <html:optionsCollection name="changesCol" /> </html:select> <!--html:link action="changeForm.do?do=changeItem" paramName="change" paramProperty="changeNumber" paramId="changeNumber">Go!<--/html:link--> <html:select property="selectedVersion"> <html:optionsCollection name="versionsCol" /> </html:select> <html:submit value="Select"/> </html:form> ChangesFilterForm.java public class ChangesFilterForm extends ActionForm { private String selectedItem; private String selectedVersion; public String getSelectedVersion() { return selectedVersion; } public void setSelectedVersion(String selectedVersion) { this.selectedVersion = selectedVersion; } public String getSelectedItem() { return selectedItem; } public void setSelectedItem(String selectedItem) { this.selectedItem = selectedItem; } } ChangesFilterAction.java public class ChangesFilterAction extends Action { @Override public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws PerforceException { ChangesFilterForm formBean = (ChangesFilterForm) form; Depot depot = new Depot(); depot.setPort("jasmin.gltrade.fr:1666"); depot.setUser("hanen.benrhouma"); depot.setPassword("Password"); depot.setClient("HBR_p4web_main"); Changes changes = new Changes(depot); //define dummy collection Collection changesCol = new ArrayList(); Collection versionsCol = new ArrayList(); List<Changelist> changesList = changes.getChangelists("//depot/*", 0, 0); changesCol.addAll(changesList); List<Changelist> versionsList = new ArrayList<Changelist>(); for( int i = 0; i<changesList.size(); i++){ if(changesList.get(i).getDescription().startsWith("VE")){ versionsList.add(changesList.get(i)); } } versionsCol.addAll(versionsList); request.setAttribute("changesCol", changesCol); request.setAttribute("versionsCol", versionsCol); request.getSession().setAttribute("depot", depot); request.getSession().setAttribute("selectedItem", formBean.getSelectedItem()); return mapping.findForward("success"); } } struts-config.xml <form-beans> <form-bean name="changesFilterForm" type="com.sungard.struts.html.collections.form.ChangesFilterForm"/> </form-beans> <action-mappings> <action name="changesFilterForm" path="/changesFilterForm" scope="request" type="com.sungard.struts.html.collections.action.ChangesFilterAction"> <forward name="success" path="/form/changesFilter.jsp" /> </action> </action-mappings> Any suggestions please? Thanks in advance, Hanen