struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jung, Eric (Contractor)" <>
Subject how to get both values and text for <html:select/> option?
Date Tue, 15 Jul 2003 18:21:50 GMT
I've searched the FAQ and the archives, but can't find an answer to this question. I'm know
it's been asked before, but part of my problem seems to be that the mail-archive search tool
doesn't like colons or < > characters (so searching for <html:select> becomes
difficult). Try as I may, I'm not able to find an answer.

I'm trying to get both the values and the text of the selected <html:options/> in an
<html:select/>. It appears that right now I'm only getting one (the values, I think,
but not the text) in my ActionForm's String array:

  public class MappingForm extends ActionForm {
    private String [] columns;
    //getColumns() and setColumns() removed for brevity

<html:select multiple="true" property="columns">
  <html:option value="a">one</html:option>
  <html:option value="b">two</html:option>

In other words, I'm only getting "a" and "b" in my array. However, I'd like to have another
String array, or a 2-dimensional String array, that receives both "a", "one", and "b", "two".

Any help would be greatly appreciated. Thanks in advance.


Eric H. Jung
Software Engineer
Russell/Mellon Analytical Services
Everett, MA, USA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message