Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to populate from DynaValidatorForm using <html:options>?

Status
Not open for further replies.

navrsalemile

Programmer
Feb 6, 2005
62
CA
Hi all,

I have following mockup JSP:


...
<td colspan="2" height="28"> <font size="2">
<html:select property="sj">
<html:eek:ption value="allj">aaa,1,str1</html:eek:ption>
</html:select>
</font>
</td>
...



Struts action will prepare results as String[] array e.g.:

aaa,1,str1
aaa,2,str2
aaa1,1,str3
aaa1,b,str4
...

and I have to show this in the page as a drop-down list of values that are represented in this String[] array returned from Struts action. I want to reuse form bean which is DynaValidatorForm and present data using <html:eek:ptions> tag.
User selects from drop-down list, data are transfered as DynaValidatorForm bean, action process data, removes selected item from the list in the form bean and sends the form bean back to user, and so on and on, user selects and action removes selected option, same bean travels in both directions.
I need an example if possible

Many thanks,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top