1.If var does not exist u are using struts 2.0.x not 2.1.x

2. Try doing something like this so this 
<s:iterator value="lawDraft.docs>
<div>one</div>
</s:iterator>
If one prints atleast one time then you have lawDraft.docs exists as a
List

3.
Say u have a classes

Class LawDraftAction{

LawDraft lawDraft;
//Getter setters
}



Class LawDraft{

List<Document> docs;
//Getter Setter
}

Class Document{

String title;
//Getter Setter again :P
}

Then in jsp you can write

<s:iterator value="lawDraft.docs>
        Document Title: <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: holod [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 25, 2008 2:06 PM
To: user@struts.apache.org
Subject: Nothing helps


attribute "var" doesn't exist in my struts-tags.tld. I'm using the last
one
struts2 pack.

lawDraft.docs returns List with 5 elements.
Simple printing </s:property value="lawDraft.docs"> shows 5 elements

I've tried to invoke method "getTitle()" of class Document which
instances
are in ArrayList:
1.
<s:iterator value="lawDraft.docs" status="document" id="doc">
</s:property value ="title">
</s:iterator>
Nothing, empty string

2.
<s:iterator value="lawDraft.docs" status="document" id="doc">
</s:property value ="%{#doc.title}">
</s:iterator>
Nothing, empty string

Previous actions prints to log fields of objects kept in
Lawdraft.getDocs()
I know, that title is not null or empty.

Can you suggest me something else?
-- 
View this message in context:
http://www.nabble.com/Problem-accessing-iterated-object-%28%3Cs%3Aiterat
or%29-tp18614028p18647504.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]

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