문제

I want to show a property of an object in my Jsp page. the problem is that this property is the name of a label in my resource bundle and the only way I know is to use <s:text name="labelname"> but now that it's a property of an object, I don't know how to do this. This is a part of my code, 'brandList' is a list of brand objects and 'brandName' field is name of label. I want something like this

       <s:iterator value="brandList" status="stat">
            <s:text name="<s:property value='brandName'>" />
       </s:iterator>

but this doesn't work. any idea? Thanks in advance.

도움이 되었습니까?

해결책

Try this:

<s:iterator value="brandList" status="stat" var="brandName">
    <s:text name="%{brandName}" />
</s:iterator>
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top