hello,
my question in one line.. how do u handle multiple
forms attached to the same form bean in one bean?
longer question -->
say i have a list of products and each product has a
list of states. i store all the states in an ArrayList
and add that as a property of product and then add all
the product(s) to the ArrayList productS.
now i add this product to the request scope and move
the a jsp page which uses <logic:iteration> to list
them.
this iteration has a form which will list them. this
form is actually a form called bidForm bean. which is
printed several times(no. of elements in the bean
productS). now i want to use the value of the bean
productS in the form bidForm. how do i do that.
say productS is iterated with the ID product. and say
a particular property called ID and i want to display
this in an hidden element for the bean bidForm.
<html:hidden name="bidForm" property="id" >
now i want it to print something liek this
<input type="hidden" name="id' value="<whatever was in
the product.id>">
my solution for the time being was to type html
instead of tags... draw back..they dont retain
values..sob sob sob.
q2. if ur still with me... yet another question..
linked to the previous problem.. there are now several
problems... each form is liked to the form bean
bidForm. each form has values frm the productS. i am
attaching a screenshot so that u know what i am
talking about actually.
so when someone fills one form..and there was some
error in filling that form..and the page is
redisplayed with all the errrors.. all the other forms
are also prefilled with the same values as they are
attached with the same form bean bidForm. ( i had
actually found out a work around for the above problem
which was something like this
---> snip <--
<select name="stateId">
<option SELECTED>--
<bean:message key="app.product.statedefault" />
--</option>
<logic:iterate id="state"
name="product" property="states">
<option value="<bean:write
name="state" property="id" />"><bean:write
name="state" property="name" /></option>
</logic:iterate>
</select >
pretty lame eh!! i know :(
--> snip <--
and not to forget no state retention so when the error
list shows one problem is fixed out of three.. the
same problem might persist due to no state retention.
regards to all..
reply asap.
rajat
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]