I don't think the var will work always, ie I am using struts 2.0.6 
The webworl.tld does not contain the var.

I expect lawDraft.docs contains a title then
<s:iterator value=" lawDraft.docs">
        <s:property value="title"/>
</s:iterator>



Regards,

Jishnu Viswanath

Software Engineer

*(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll

Tavant Technologies Inc.,

www.tavant.com

PEOPLE :: PASSION :: EXCELLENCE


-----Original Message-----
From: Jim Kiley [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 23, 2008 9:26 PM
To: Struts Users Mailing List
Subject: Re: Problem accessing iterated object (<s:iterator)

The 'status' variable does not hold the individual instance.  It holds
an
IteratorStatus object, which does things like tell you whether this row
is
odd or even.  You want to do var="document" instead.

On Wed, Jul 23, 2008 at 11:53 AM, holod <[EMAIL PROTECTED]>
wrote:

>
> Plsease, see my code:
> <table>
>        <s:iterator value="%{lawDraft.docs}" status="document">
>                <tr>
>                        <td>
>                                <s:url id="downloadLink"
> value="downloadLawDraftDocument.action"
> namespace="/admin" >
>                                        <s:param name="lawDraftId"
value="#
> document.lawDraft.id" />
>                                        <s:param name="documentTitle"
> value="#document.title" />
>                                </s:url>
>                                <a_ href="#downloadLink" ><s:property
> value="#document.title"/>
>                        </td>
>                        <td>
>                        delete document <img_ align="left" src="<s:url
> value="/images/admin/delete.gif"/>" onclick=""/>
>                        </td>
>                </tr>
>        </s:iterator>
> </table>
>
> previous action has method getLawdraft();
> LawDraft has method getDocs();
> getDocs() returns a List
> List consists of Document objects, the have methods
getLawDraft().getId()
> and others.
> Iterator repeat 5 times (correct), but output doesn't have values
(they
> are!
> previous action prints them using logger)
>
> Please, see the output:
>
> <tr>
>        <td>
>                <a_ href="#downloadLink" >
>        </td>
>        <td>
>                delete document <img_ align="left"
> src="/CLIAccess/images/admin/delete.gif" onclick=""/>
>        </td>
> </tr>
>
> *Sorry for <a_ and <img_, Nabble doesn't escape html (
> --
> View this message in context:
>
http://www.nabble.com/Problem-accessing-iterated-object-%28%3Cs%3Aiterat
or%29-tp18614028p18614028.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Jim Kiley
Technical Consultant | Summa
[p] 412.258.3346 [m] 412.445.1729
http://www.summa-tech.com
Any comments or statements made in this email are not necessarily those of 
Tavant Technologies.
The information transmitted is intended only for the person or entity to which 
it is addressed and may 
contain confidential and/or privileged material. If you have received this in 
error, please contact the 
sender and delete the material from any computer. All e-mails sent from or to 
Tavant Technologies 
may be subject to our monitoring procedures.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to