struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From musom...@aol.com
Subject Re: getting listValue back to actionclass from s:select tag
Date Tue, 28 Jul 2009 03:11:25 GMT

 Not sure what you mean when you say it is dynamic -- Why not keep track of the original key-value
pairs in the user session?
You only need the key.
Chris


 


 

-----Original Message-----
From: Bhaarat Sharma <bhaarat.s@gmail.com>
To: Struts Users Mailing List <user@struts.apache.org>
Sent: Mon, Jul 27, 2009 9:52 pm
Subject: getting listValue back to actionclass from s:select tag










I have a s:select tag which is working fine.
                    <s:select label="fmr.terminationReason"
                              name="fmr.terminationReason"
                              list="rejectionReasons"
                              listKey="rejectedReasonCode"
                              listValue="rejectedReason"
                              multiple="true"
                              required="true"
                              size="9"
                              value="%{fmr.terminationReason.{reasonId}}"/>

html code made out of that is:
    <select name="fmr.terminationReason" size="9" multiple="multiple">
    <option value="1">Reason1*</option>
    <option value="2">Reason2</option>
    <option value="3">Reason3*</option>
    </select>

when user selects stuff from this select box and submits what is sent back
is listKey.  Is there any way to get the listValue (content) back to the
action class?

I want to do this because as you can see some reasons have * behind them and
I want to have some logic for when users select reasons with *.  I can not
just go by value because it is dynamic.

Is there a way to get around this hurdle?



 


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