struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Larry Meadors" <Larry.Mead...@plumcreek.com>
Subject RE: Question about <select multiple='true' ...>
Date Wed, 01 May 2002 15:34:53 GMT
>Second, a <select> sends only its value(s); you are (apparently)
expecting
>the options' index position and text in your first mutator.

That was the question: How do those values get sent? 
 
Clearly, they are not sent one at a time with an index.
 
Clearly, they are not sent all at once as an array.
 
Should I be watching for a carrier pigeon? :-)
 
Larry

-----Original Message-----
From: Larry Meadors [mailto:Larry.Meadors@plumcreek.com]

OK, I have this html:

<select name='unt' multiple='yes' disabled='yes' size='5'>
  <option value='MAINE'>Maine</option>
  <option value='FLTHD'>Flathead</option>
  <option value='CLRWT'>Clearwater</option>
  <option value='RKYPR'>Rockies Purchased Logs</option>
  <option value='WNFLD'>Winnfield</option>
  <option value='HUTTG'>Huttig</option>
  <option value='OREGN'>Oregon</option>
  <option value='CRSET'>Crossett</option>
</select>

and these setters in my form bean:

public void setUnt(int index, String unt) {
  this.unt[index] = unt;
}

public void setUnt(String[] unt) {
  this.unt = unt;
}

But I get an IllegalArgumentException when I submit my page before
either method gets called.

What am I missing?


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message