struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Samit Goyal" <samit.go...@tatainfotech.com>
Subject Help: Using <logic:iterate> for editable fields.
Date Thu, 08 Mar 2001 09:35:37 GMT



> Hi All,
>
>
> I have three String Arrays (wiz firstName and lastName) in my form bean.
> Each array contains 3 elements. I want to display them in my jsp in form
of
> 3 rows and each row shall contain both fields.Something like this:-
>
> row 1 > firstName         lastName
> row 2 > firstName         lastName
> row 3 > firstName         lastName
>
> Also i want that , upon submission of the form the struts shall set the
> values in the respective String[] fields automatically
> My problem is that I dont know that on which array shall i Iterate using
> <logic:iterate> tag? If i use three <logic:iterate> tags, one for each
> field, then i am not able to show them in a Row.
>
> <logic:iterate id="strFirstName" property="firstName" name="myFormBean">
>           <TR>
>                 <td >
>                         <html:text  property="firstName"
> value="<%=strFirstName.toString()%>" />
>                 </td>
>             </tr>
> </logic:iterate>
>
> <logic:iterate id="strLastName" property="lastName" name="myFormBean">
>           <TR>
>                 <td >
>                         <html:text  property="lastName"
> value="<%=strLastName.toString()%>" />
>                 </td>
>             </tr>
> </logic:iterate>
>
> For this kind of functionality what is the best way. I want that struts
> shall iterate over a collection for displaying records and shall populate
> them automatically upon submission of form. Also i want to retain the
> presentation in the above metioned fashion.
>
>  Please help...
>
> Regards,
> Samit
> > > > > > > -----Original Message-----
> > > > > > > From: David Graham [mailto:dgraham1980@hotmail.com]
> > > > > > > Sent: Wednesday, March 05, 2003 11:32 PM
> > > > > > > To: struts-user@jakarta.apache.org
> > > > > > > Subject: Re: Can <logic:iterate> be used for editable
fields?
> > > > > > >
> > > > > > >
> > > > > > > You're not disturbing anyone on the list :-).  We're here
> > > > > > > because we want
> > > > > > > to, not because we have to.
> > > > > > >
> > > > > > > David
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > >From: "Samit Goyal" <samit.goyal@tatainfotech.com>
> > > > > > > >Reply-To: "Struts Users Mailing List"
> > > > > > > <struts-user@jakarta.apache.org>
> > > > > > > >To: "Struts Users Mailing List"
> > > <struts-user@jakarta.apache.org>
> > > > > > > >Subject: Re: Can <logic:iterate> be used for
editable fields?
> > > > > > > >Date: Thu, 6 Mar 2003 10:10:11 +0530
> > > > > > > >
> > > > > > > >
> > > > > > > >Thanks a lot David . You solved my big problem.
> > > > > > > >
> > > > > > > >I will try this out...hope i wont need to disturb
> > > you again :-)
> > > > > > > >
> > > > > > > >Thanks again.,
> > > > > > > >Samit
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >----- Original Message -----
> > > > > > > >From: "David Graham" <dgraham1980@hotmail.com>
> > > > > > > >To: <struts-user@jakarta.apache.org>
> > > > > > > >Sent: Thursday, March 06, 2003 9:48 AM
> > > > > > > >Subject: Re: Can <logic:iterate> be used for
editable fields?
> > > > > > > >
> > > > > > > >
> > > > > > > > > Simply put an <html:text> tag inside your
iteration.  All
> > > > > > > your text
> > > > > > > >inputs
> > > > > > > > > will be the same name so you need a String[]
variable in
> > > > > > > your form bean
> > > > > > > >to
> > > > > > > > > hold all of the entries.
> > > > > > > > >
> > > > > > > > > David
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > >From: "Samit Goyal" <samit.goyal@tatainfotech.com>
> > > > > > > > > >Reply-To: "Struts Users Mailing List"
> > > > > > > <struts-user@jakarta.apache.org>
> > > > > > > > > >To: "strtus list" <struts-user@jakarta.apache.org>
> > > > > > > > > >Subject: Can <logic:iterate> be used
for editable fields?
> > > > > > > > > >Date: Thu, 6 Mar 2003 09:57:25 +0530
> > > > > > > > > >
> > > > > > > > > >Hi all,
> > > > > > > > > >
> > > > > > > > > >I am forwarding again this mail to you all,
Since i
> > > > > > > didnt get any
> > > > > > > >reply.
> > > > > > > > > >May
> > > > > > > > > >be that my problem was not clear. I am putting
this
> > > > > again in a
> > > > > > > >different
> > > > > > > > > >way.
> > > > > > > > > >
> > > > > > > > > >I konw how to display the list of un-editable
> > > fields by using
> > > > > > > > > ><logic:iterate> but i want to display
list of Editable
> > > > > > > fields, so that
> > > > > > > >upon
> > > > > > > > > >submission of the form, all the user enterd
values shall
> > > > > > > be stored in
> > > > > > > >some
> > > > > > > > > >form bean variable!
> > > > > > > > > >
> > > > > > > > > >What's the easiest way out. i dont want to
create a
> > > > > > > different variable
> > > > > > > >in
> > > > > > > > > >the form bean for each individual text field
displayed
> > > > > > > on the screen.
> > > > > > > > > >
> > > > > > > > > >Please excuse me for what may be a stupid
question for
> > > > > > > you! but I am
> > > > > > > >new
> > > > > > > >to
> > > > > > > > > >the struts and desperately looking for the
solution.
> > > > > > > > > >
> > > > > > > > > >Regards,
> > > > > > > > > >Samit
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > > Hi all,
> > > > > > > > > > >
> > > > > > > > > > > I am having a JSP which contains 12
rows of editable
> > > > > > > fields. The
> > > > > > > >each
> > > > > > > > > >row
> > > > > > > > > > > contains same type of editable fields.
> > > > > > > > > > >
> > > > > > > > > > > Now, how shall i handle it in the Form
Bean.
> > > > > Shall i create 12
> > > > > > > >different
> > > > > > > > > > > fields for each row or can I use Array/List
for that.
> > > > > > > > > > >
> > > > > > > > > > > Will struts set the fields in the Array
Object of
> > > > > form bean
> > > > > > > > > >automatically??
> > > > > > > > > > >
> > > > > > > > > > > Thanks in Advance.
> > > > > > > > > > > Regards,
> > > > > > > > > > > samit
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > >
> > > > >
> > > >---------------------------------------------------------------------
> > > > > > > > > >To unsubscribe, e-mail:
> > > > > > > struts-user-unsubscribe@jakarta.apache.org
> > > > > > > > > >For additional commands, e-mail:
> > > > > > > struts-user-help@jakarta.apache.org
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > _________________________________________________________________
> > > > > > > > > Tired of spam? Get advanced junk mail protection
> > > with MSN 8.
> > > > > > > > > http://join.msn.com/?page=features/junkmail
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > >
> > > > >
> > > ---------------------------------------------------------------------
> > > > > > > > > To unsubscribe, e-mail:
> > > > > struts-user-unsubscribe@jakarta.apache.org
> > > > > > > > > For additional commands, e-mail:
> > > > > > > struts-user-help@jakarta.apache.org
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > >
> > > >---------------------------------------------------------------------
> > > > > > > >To unsubscribe, e-mail:
> > > > > struts-user-unsubscribe@jakarta.apache.org
> > > > > > > >For additional commands, e-mail:
> > > > > struts-user-help@jakarta.apache.org
> > > > > > >
> > > > > > >
> > > > > > >
> > > _________________________________________________________________
> > > > > > > Add photos to your messages with MSN 8. Get 2 months FREE*.
> > > > > > > http://join.msn.com/?page=features/featuredemail
> > > > > > >
> > > > > > >
> > > > > > >
> > > > >
> > > ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail:
> > > struts-user-unsubscribe@jakarta.apache.org
> > > > > > > For additional commands, e-mail:
> > > > > struts-user-help@jakarta.apache.org
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > >---------------------------------------------------------------------
> > > > > >To unsubscribe, e-mail:
> > > struts-user-unsubscribe@jakarta.apache.org
> > > > > >For additional commands, e-mail:
> > > struts-user-help@jakarta.apache.org
> > > > >
> > > > >
> > > > > _________________________________________________________________
> > > > > Help STOP SPAM with the new MSN 8 and get 2 months FREE*
> > > > > http://join.msn.com/?page=features/junkmail
> > > > >
> > > > >
> > > > >
> > > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> > > > > For additional commands, e-mail:
> > > struts-user-help@jakarta.apache.org
> > > > >
> > > >
> > > >
> > > >---------------------------------------------------------------------
> > > >To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> > > >For additional commands, e-mail: struts-user-help@jakarta.apache.org
> > >
> > >
> > > _________________________________________________________________
> > > MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
> > > http://join.msn.com/?page=features/virus
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: struts-user-help@jakarta.apache.org
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org


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


Mime
View raw message