The moose likes Struts and the fly likes <s:textfield value=" title="" /> Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "<s:textfield value="NEED_TO_CHECK_CONDITION" name="testField"/>" Watch "<s:textfield value="NEED_TO_CHECK_CONDITION" name="testField"/>" New topic

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

Rohit Rai
Ranch Hand

Joined: Aug 04, 2008
Posts: 53
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


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

Any pointers ???

Thanks a lot
David Newton

Joined: Sep 29, 2008
Posts: 12617

<s:set ...><s:if...></s:set>


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

You can't nest custom tags like you've tried.
I agree. Here's the link:
subject: <s:textfield value="NEED_TO_CHECK_CONDITION" name="testField"/>
jQuery in Action, 3rd edition