Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

<s:textfield value="NEED_TO_CHECK_CONDITION" name="testField"/>

 
Rohit Rai
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am trying to do a conditional check in s:textfield.
e.g. i will display XXX if some condition is true and YYY if false


Is it possible to do it?
Also if i go in for some other approach like using s:set

e.g.

How do i test this value in s:textfield for display?

Any pointers ???

Thanks a lot
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<s:set ...><s:if...></s:set>

or

Use OGNL; "foo == 5 ? 'wat' : 'ohai'"

You can't nest custom tags like you've tried.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic