You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Sniadach, Tomasz" <Sn...@makdata.de> on 2004/02/17 16:02:54 UTC

html:options with validate

hi , 
i have an ActionForm with countries in html:options , there are some
other fields, that i have to validate. So, when i submit and errors
occur, the field selected in countries is set to default. Is there a way
to mark the selected field? 
The other fields (text fields) are not cleared.

In my JSP i have something like this:
<htmlt:select property="selectedLand">
	<html:options property="countries"/>
</html:select>

in the Form ;

public String getSelectedLand() {
	return eb.getLand()[0]; 
}
		
public String[] getCountries() {
	return eb.getCountries();
}

Thx for suggestions.
Tomek