wood burning stoves 2.0*
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
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
Author

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

Rohit Rai
Ranch Hand

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

Joined: Sep 29, 2008
Posts: 12617

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

or

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

You can't nest custom tags like you've tried.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: <s:textfield value="NEED_TO_CHECK_CONDITION" name="testField"/>