[opencms-dev] wierd issues with select method using multi part form-data

Harish.Chakravarthy at sjsu.edu Harish.Chakravarthy at sjsu.edu
Mon Feb 9 00:35:02 CET 2004


Hi,

I have a simple backoffice template using form method=post with
enctype=multipart/form-data
my code: <form name="NACHRICHT" action="CourseEditBackoffice.html"
method="post" ENCTYPE="multipart/form-data">

I have form type select to allow the user to select multiple input values.
my code:
  <select name="departmentIds" id ="departmentIds" style="width:px"
size="10" multiple>
  <option value='1' >Dept 1</option>
  <option value='2' >Dept 2</option>
  <option value='3' >Dept 3</option>
  </select>

Here I select Dept 1 and Dept 3. In the backoffice module I get the form
values
my code:
String[] depts =
cms.getRequestContext().getRequest().getParameterValues("departmentIds");

Problem: Here depts is null, so I get the form values by -
my code:
 String inputdept = (String) parameters.get("departmentIds");
But inputdept value is 3 NOT 1 and 3 (as selected earlier). In a similar
way if I select Dept 2 and Dept 3, the inputdept value is 3.

I am getting only my last selected value insetead of getting all selected
values. If I replace post method with get, it works fine !. Secondly this
works on Opencms 5 rc1.

I am using Opencms 5 final.

Any information on what is happening ?

Thanks
Harish





More information about the opencms-dev mailing list