I have the following code that does not seem to work. I do not understand why this will not work.
<s:iterator value=%{questions} id="question">
<s:if test='%{incorrectQs.contains("#question.questionId")}'>
Print something here
</s:if>
</s:iterator>
In the above code, basically, I have a method called getQuestions in the action class. This list contains objects of the Exam class, which has a get / set questionId. I also have a list of rightQs that contains strings. I check if errQQ contains a questionId request. if I want to print some text. Although the code above does not work, the code below works fine. Sometimes it works, and sometimes it doesn't ... :(
<s:iterator value=%{questions}>
<s:if test='%{incorrectQs.contains("${questionId}")}'>
Print something here
</s:if>
</s:iterator>
can anyone explain this?
source
share