Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem using <s:if tag of Struts2

 
Abdul Mujeeb Md
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am trying to use <s:if> tag, but it doesn't work.



prints me, a value 'D'

In this case the If condition has to fail and the "Inside If" should not be printed. But the code evaluates the condition successfully and prints "Inside If".

Where am I making a mistake?

Thanks.


 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
 
Abdul Mujeeb Md
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply David. It still doesn't work.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Abdul Mujeeb Md wrote:Thanks for your reply David. It still doesn't work.

That's not enough information to help solve your issue. I'd need current code, the types of the data you're comparing, etc. The <s:if> tag works fine if given appropriate comparisons.
 
Abdul Mujeeb Md
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi David,

is a ArrayList containing a String Array.


Now I pass access this value in the jsp to evaluate the condition for the value of strData[3] which is "D". It causes the problem.

Hope I have provided you with sufficient information.

Thanks.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try using the "#" notation inside the if tag.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic