Martin,
You can figure out which one(s) are selected by used the getValues function on the field object. A helper function could be useful - (there already is one for Checkboxes/radio buttons). I have added one to CVS for penguin - I will put out a new version in a few days - once I have checked for side effects.


The code is
private static final String SELECTED = "selected=\"selected\"";

/**
* Returns the HTML attribute for selected within an option group
* @param value
* @return
*/
public String isSelected(String value) {
// We can always uses the array as values is always filled by validation
for (int i = 0; i < values.length; i++) {
if (values[i].equals(value)) { return SELECTED; }
}
return "";
}


Ben

Martin Wendel wrote:

Hey guys, i think the penguin tool is nice, however it is missing the value
of "selected" for options in select lists...

I thought about just adding a Selected to the Option class, but I'm not sure
about what else to do. Any help here?

/Martin


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








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



Reply via email to