struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bhaskar Gopalan <>
Subject Trimming strings in html:options
Date Mon, 01 Apr 2002 17:16:18 GMT
I am dynamically populating a options field from the database. For this I am
getting an ArrayList
of strings that are formatted as id:value. 

PipelineFilterForm pipelineFilterForm =
java.util.ArrayList statusOptions = pipelineFilterForm.getStatusOptions();
if(statusOptions != null) {
	pageContext.setAttribute("statusOptions", statusOptions,
	<html:select size="1" property="stageVal">
                 <html:option value="0">Select One</html:option>
                 <html:options name="statusOptions"/>

The options displayed are id:value which is ok. But I want to set the value
of each option
equal to the 'id' part of the string. Is there any way to do this?

Also, line 2 of the code shows how I access the formBean from the form. Is
there any other
way to acheive this?


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

View raw message