开发者

How to use the iterator tag in Struts2?

I have

class A {
   private String field1;
   private String field2;
   private B b;
}

class B {
   private String field3;
}

List<A> myList;

How can I access the field3 using the myList?

This would work for field1 and field2, but how about field3?

开发者_开发技巧
 <s:iterator value="myList">
                <tr>
                    <td><s:property value="field1"/></td>
                    <td><s:property value="field2"/></td>

                </tr>
            </s:iterator>


I think it's:

b.field3


It should be b.field3

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜