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%3Aiterator%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

Reply via email to