Hey, I can't think of a quick fix for this offhand. However, I think there are some resources available online somewhere that allow you to create tables column by column rather than line by line. I can't remember where I saw this, but I'll let you know if I do. One quick fix I came up with when I was working on my app was to create a display property. All it did was return one long String with the properties and any extra desired text in it. I know it's a very inelegant fix, but it's the only thing I can come up with off the top of my head without you restructuring your form beans like I suggested before. Could anyone who knows what I mean about those table resources that let you create a table column by colmun let us all know? I found out about it on this list, so someone has to know what I'm talking about. Hope this is helpful and that I'm making some sense.
~ Keith http://www.buffalo.edu/~kkamholz -----Original Message----- From: Zayed [mailto:[EMAIL PROTECTED]] Sent: Monday, July 08, 2002 1:51 AM To: Struts Users Mailing List Subject: Re: logic:iterate populating with multiple String[] Hi, Has enyone got answer for this? thanks, Zayed [EMAIL PROTECTED] wrote: > Hi Keith, > Thanks for your reply. > > The Problem I am facing is regarding the use of <logic:iterate> and > <bean:write> tags > > Let me restate my problem > > I am developing a WEB-UI for a third party Java Application Therefore > I don't have control over the object/s returned. > I get two String arrays of the same length which I should be showing > in a table. The first String[] contains productName and the second > String[] contains the corresponding product description. how do I > construct the table rows using <logic:iterate> and <bean:write> tags. > > The corresponding JSP code looks is below > > <% > String[] productNamesArray = //Get the product names array > String[] productDesctriptionArray = //Get the product description > array > //FYI : productNamesArray.length = productDesctriptionArray.length > > for(int i=0; i<productNamesArray.length; i++ ){ > > %> > > <tr> > <td> > <%= productNamesArray[i] %> </td> > <td> > <%= productDesctriptionArray[i] %> </td> > </tr> > > <% > }//end of for loop > %> > > could somebody help me with corresponding snippet using > <logic:iterate> and <bean:write> tags > > Thanks in advance > > Cheers!! > Zayed > > > [EMAIL PROTECTED] wrote: > >> I'm not sure if I'm understanding what you're trying to do, but I'm >> doing >> something similar. I decided not to use an array for each property. >> I have >> a bean that holds the info for an entry, and then in the action I add >> that >> bean to an EntryHolder object that stores lists of entries. Then I >> simply >> iterate through my EntryHolder lists and get the info for each >> entry. This >> is also a more understandable design, because it's perfectly clear which >> entry properties go together. With arrays of properties, it is less >> clear >> which individual properties correspond to each other. However, I am >> kinda >> new to all this, so if I'm wrong about anything, someone please >> correct me. >> I hope this helps. >> >> ~ Keith >> http://www.buffalo.edu/~kkamholz >> >> >> >> -----Original Message----- >> From: Zayed [mailto:[EMAIL PROTECTED]] >> Sent: Friday, July 05, 2002 9:39 AM >> To: Struts Users Mailing List >> Subject: logic:iterate populating with multiple String[] >> >> >> Hi, >> >> I am struck up with this problem. please help >> >> I am iterating rows. In the first column I populate Product Name, In >> the second coulmn I populate Product Description. Both are contained >> in String Arrays. The productListForm is of type DynaActionForm whose >> form-properties are productName and productDesciption Arrays. >> >> How do I construct <logic:iterate> and <bean:write> tags. Please help >> >> >> This is what I have as of now ( it dosent work though) >> >> <logic:iterate id="productName" name="productListForm" >> property="name" indexId="index"> >> <tr> >> <td> >> <bean:write name="productName"/> >> </td> >> <td> >> <bean:write name="what should go here ?? "/> >> </td> >> </tr> >> <logic:iterate> >> >> Thanks in advance >> >> >> -- >> To unsubscribe, e-mail: >> <mailto:[EMAIL PROTECTED]> >> For additional commands, e-mail: >> <mailto:[EMAIL PROTECTED]> >> >> -- >> To unsubscribe, e-mail: >> <mailto:[EMAIL PROTECTED]> >> For additional commands, e-mail: >> <mailto:[EMAIL PROTECTED]> >> > > > > -- > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

