Hi, Dave:
I didn't get any error for the indexed tag, I get all the attribute[n].value
for the iterate html text names properly, but the problem is all these field
didn't set back to the attributes array in my form bean.
Thanks
Frank Ling
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 10, 2001 2:16 PM
Subject: Re: Sorry, another question for Iterate Tag
>
>
> Frank,
>
> What error do you get?!
>
> Dave
>
>
>
>
>
> "Frank Ling" <[EMAIL PROTECTED]> on 07/10/2001
03:16:52
> PM
>
> Please respond to [EMAIL PROTECTED]
>
> To: [EMAIL PROTECTED]
> cc: (bcc: David Hay/Lex/Lexmark)
> Subject: Sorry, another question for Iterate Tag
>
>
>
> Good Morning:
>
> I have a question for the iterate property update with indexed tag.
>
> Normally I use my own tag to show the real name of the iterate property
for
> update purpose, then just read them out from the HTTPRequest on my action
> class, that works well until recently I have to add a upload feature to
one
> of my page which have Iterate tags. Since there aren't any HTTPRequest
left
> in my action class to read due to the multipart issue. Then I try to using
> the ActionForm to handle the Iterate property for update.
>
> I go through couple thread on this mailing list regarding for the indexed
> tag on iterate tag for update purpose, and follow all the steps, still
can't
> get this thing works, please help me out.
> Here are the step I did.
>
> 1) I get a object call InflowAttributes have three field, all have the
> getters and setters.
> a. String name
> b. String type
> c. String value
>
> 2) I get form-bean call UserForm and have one of the field.
> a. InFlowAttribute[] attributes.
> have three method for the field.
> a.
> public InFlowAttribute[] getAttributes() {
> return this.attributes;
> }
> b.
> public void setAttributes(InFlowAttributes[] attributes) {
> this.attributes = attributes;
> }
> c.
> public InFlowAttribute getAttribute(int index) {
> return this.attributes[index];
> }
> 3) I get jsp for the editing a userform, have couple thing made for
this
> indexed Iterate & Text tag.
> a) I get Dave Hay's indexed package install on top of the struts 1.0
> release, both java and tld.
> b) I have struts-html.tld and struts-logic.tld define on top of my JSP
> page.
> c) Here is my implementation for the iterate.
> <logic:iterate id="attribute" name="userForm" property="attributes">
> <tr>
> <td><struts:htmpProperty name="attribute" property="name"/><.td>
> <td><html:text name="attribute" property="value"
> indexed="true"/></td>
> </tr>
> </logic:iterate>
> d) I have all the attribute[0..n].value set up properlly without any
> problem.
>
> 4) This JSP for editing userform will trigged a saveUser action. Here
is
> my problem, I can get all the other field from userform without problem
> except attributes field is null, no matter whatever I do.
>
> I know some thing I did wrong to cause the array attributes didn't get set
> back to my userform, but just couldn't figure out why, If some people out
> there can help me out, there will be really appreciated. Basically I try
to
> understand how the HTML form request get populate back to form bean.
> especially how the "attribute[0..n].value" can get set back to array
> "attributes" on my form.
>
> By the way, until to this point, I still didn't put
> enctype="multipart/form-data" on my form yet, so this will be pure Iterate
> tag update issue.
>
> Thanks in advance for the help.
>
> Regards
>
> FL
>
>
>
>
>
>
>
>