• 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.
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!