문제

What is the exact use of %{} notation in Struts 2? Can someone explain with a simple example where the code works when %{} is used and does not works when its not used?

도움이 되었습니까?

해결책

Used in OGNL to force evaluate the content in brackets as OGNL expression. For example

<s:iterator value = "myAnswers" status="stat">
<s:textfield name = "myAnswers[%{#stat.index}].name"/> 

evaluation of the stat.index should be forced.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top