No takers for this?

M

-----Original Message-----
From: Manav Gupta 
Sent: Monday, October 06, 2003 5:42 PM
To: 
Subject: retrieving values from multiple="true" select box


Hi,

I'm sure this has been resolved by a thousand ppl before me, but I'm unable
to find an answer to it. I did google, but I'm at a loss I'm afraid.

So here goes: I need to retrieve all selected values from a HTML select
object, that has "multiple=true" set.

Here's my form bean snippet:
=======
private final class TheFormBean {
 private String[] circuitTypeIDs;

  public  void setCircuitTypeIDs(String[] circuitTypeIDs)
  {
      this.circuitTypeIDs = circuitTypeIDs;
  }

  public  String[] getCircuitTypeIDs() {
   return this.circuitTypeIDs;
  }
}

  
The JSP:
=======
<html:select name="CircuitForm" property="circuitTypeIDs" multiple="true"
size="3" >
    <html:options collection="CircuitTypes" property="ID"
labelProperty="name"/> 
</html:select>


I do set the collection 'CircuitTypes' in the request in the action class
that forwards to the JSP above. 
The form-bea 'CircuitForm' has been declared in struts-config.xml (and I do
understand I don't need to mention the name of that form in the JSP).

However, when it retrieves only the *first* selected value in the select
box. What am I missing?

Deeply stressed,
M

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

Reply via email to