Depends what your thinking is on where you want to maintain the items in the select menu. For example have then is a properties file or tiles def. But that might not be simpler for your situation.

<html:select property="foo">
<html:options collection="foos" property="ref" labelProperty="name" />
</html:select>


cheers mark

On Wednesday, May 28, 2003, at 20:56 Europe/London, Barry Volpe wrote:

The following works but I was wondering if there is an easier way?

 <html:form action="/GetCategory"
      name="categoryForm"
      type="com.CategoryForm"
  scope="request" >
 <html:select property="category" size="1">
    <html:option value="Category">Select-A-Category</html:option>
    <html:option value="FormA">Form A</html:option>
    <html:option value="FormB">Form B</html:option>
    <html:option value="FormC">Form C</html:option>
    </html:select>
  <html:submit />
 </html:form></td>


//In my action


String target = new String(request.getParameter("category"));


//In my action form


public class CategoryForm extends ActionForm {

protected String category;

public void setCategory(String category) {

    this.category = category;
  }

public String getCategory() {

    return category;
  }


//Now the ugly part in my STRUTS-CONFIG:


<action path="/GetCategory"
      type="com.childrencare.GetCategoryAction"
      name="categoryForm"
      scope="request"
      input="/useradminpage.jsp"
      validate="false" >
      <set-property property="loginRequired" value="false"/>
   <forward name="FormA" path="/formA.jsp"/>
   <forward name="FormB" path="/formB.jsp"/>
   <forward name="FormC" path="/formC.jsp"/>
       </action>

Is there an easier way? Doesn't seem right to define multiple fowards in the struts-config.

Thanks,
Barry



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to