struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bhaskar Gopalan <bgopa...@adaptintel.com>
Subject Trimming strings in html:options
Date Mon, 01 Apr 2002 17:16:18 GMT
Hi,
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. 

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

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?

Thanks,
Bhaskar

--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message