struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arron Bates <arr...@pacific.net.au>
Subject Re: help with logic:iterate
Date Tue, 26 Feb 2002 06:35:33 GMT
If you model it the other way (ie: a collections of objects that 
individual properties for each column. eg: ResultSet style) it will be 
much easier. Then you can point the iterate tag's property at the 
collection, and then use the nested text tags to show each of the 
properties within each bean.

Makes like _much_ easier to manage.

Arron.

Sriram Nookala wrote:

>The following worked for me:
>
><nested:iterate property="columnNameList">
> <tr>
>        <td>
>          <nested:text property="this/" />
>        </td>
>....
>
>However if I have another String collection called columnTypeList which has
>the same length as the columnNameList and which also I'd like to populate
>and display with text boxes, how would I implement that. I'd put my question
>as how would I loop thru another collection along with the collection
>mentioned in the nested:iterate tag?
>----- Original Message -----
>From: "Arron Bates" <arronb@pacific.net.au>
>To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
>Sent: Monday, February 25, 2002 5:59 PM
>Subject: Re: help with logic:iterate
>
>
>>You're basically using the markup of the nested tags. If you have the
>>nightly build change your iterate tag to...
>>
>><nested:iterate property="columnNameList">
>>
>>...and your text tag to....
>><nested:text property="columnName" />
>>
>>...and of course don't forget to close the iterate tag with the
>>
></nested:iterate>
>
>>
>>If you're not on the nightly build, you can get the download from here...
>>http://www.keyboardmonkey.com/struts
>>
>>It simply makes quick work of iterating and nesting beans as you are here.
>>
>>
>>Arron.
>>
>>
>>Sriram Nookala wrote:
>>
>>>I have the following snippet of code in my jsp:
>>>
>>><logic:iterate id="columnName" name="ParticipantImportWizardForm"
>>>property="columnNameList">
>>>
>>><table border="1" width="80%">
>>>   <tr>
>>>       <td width="50%"><h3 align="center">Column Name</h3>
>>>       </td>
>>>       <td width="50%"><h3 align="center">Type</h3>
>>>       </td>
>>>   </tr>
>>>   <tr>
>>>       <td width="50%"><html:text property="columnName" /></td>
>>>       <td width="50%">
>>>           <p>&nbsp;</p>
>>>       </td>
>>>   </tr>
>>>....
>>>
>>>I get the error "No getter method for property columnName of bean
>>>
>org.apache.struts.taglib.html.BEAN".
>
>>>columnNameList is a collection of Strings. I can't figure out what I have
>>>
>to set the name and property attributes of html:text in this case.
>
>>
>>
>>--
>>To unsubscribe, e-mail:
>>
><mailto:struts-user-unsubscribe@jakarta.apache.org>
>
>>For additional commands, e-mail:
>>
><mailto:struts-user-help@jakarta.apache.org>
>
>
>
>
>--
>To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
>For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>
>
>



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


Mime
View raw message