开发者

Struts2 Setting a List Variable

开发者 https://www.devze.com 2023-02-20 05:43 出处:网络
I have a list at Struts2 and I want to define a variable for it. I did that: <s:set name=\"userList\" value=\"retrieveUserList(@com.company.project.commons.beans.Profile@YOURSELF.typeId)\"/>

I have a list at Struts2 and I want to define a variable for it. I did that:

<s:set name="userList" value="retrieveUserList(@com.company.project.commons.beans.Profile@YOURSELF.typeId)"/> 

I want to get the elements of it, for example:

<s:property value="retrieveUserList(@com.company.project.commons.开发者_C百科beans.Profile@YOURSELF.typeId)[5].name"/> 

was working but after I set, it I want to use that variable bu this doesn't work:

<s:property value="#userList[5].name"/>

How to use it?


It should be like that:

<s:property value="%{#userList[5].name}"/>
0

精彩评论

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

关注公众号