Imagine the following enum...
public enum ResidentStatus {
OWN ("O", "Own"),
RENT("R", "Rent"),
OTHER ("X", "Other");
public String value;
public String status;
ResidentStatus(String value, String status) {
this.value = value;
this.status = status;
}
public String getValue() { return this.value; }
public String getStatus() { return this.status; }
}
Given a view with a dropdown box for choosing one's resident status,
using options-enumeration:
<stripes:options-enumeration enum="ResidentStatus" label="status"/>
Results in the following HTML:
<select name="ResidentStatus">
<option value="OWN">Own</option>
...
</select>
*** This is the expected and correct output for an options-enumeration,
*except* that it requires a greater amount of refactoring in the
backend.
Existing systems will process "resident status" based on the values of
[O,R,X] *not* [OWN,RENT,OTHER].
In looking at the J2SE options, using an EnumSet or EnumMap could allow
us to then use options-collection or options-map in the JSP.
Is this acceptable, or is there something about options-enumeration that
could allow me to get at the value and label in the output?
Thanks,
Tim
--
Timothy Stone | Application Developer Technical Lead
Strategic Development, Business Technology Group | Barclaycard US
direct 302.255.8044 | cell 410.441.9450
COMPANY CONFIDENTIAL
Barclays www.barclaycardus.com
This e-mail and any files transmitted with it may contain confidential and/or
proprietary information. It is intended solely for the use of the individual or
entity who is the intended recipient. Unauthorized use of this information is
prohibited. If you have received this in error, please contact the sender by
replying to this message and delete this material from any system it may be on.
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables
unlimited royalty-free distribution of the report engine
for externally facing server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users