File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes validwhen not working for String comparision Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "validwhen not working for String comparision" Watch "validwhen not working for String comparision" New topic
Author

validwhen not working for String comparision

Nishita Jain
Ranch Hand

Joined: Mar 30, 2006
Posts: 97
hi all,
i am facing strange problem . i want to use or probably i can only use validwhen in this case but somehow i m not able to do string comparision .
my code is like

<field property="order.orderManager" depends="required" >
<arg0 key="orderTrackerForm.orderManager"/>
</field>
<field property="order.referenceNo" depends="validwhen" >
<arg0 key="orderTrackerForm.referenceNo"/>
<var>
<var-name>test</var-name>
<var-value>( order.orderManager == "A")</var-value>
</var>
</field>

here referenceNo is not giving validation error in any case (Manager == "A" or != "A")

other validations are working. can anybody tell me whats my mistake?

Thanks in advance,
Nishita

[ July 24, 2007: Message edited by: Nishita Jain ]
[ July 24, 2007: Message edited by: Nishita Jain ]

Nishita
Zoram Paul
Ranch Hand

Joined: Jul 10, 2007
Posts: 59
Hi Nishita,
I am very new to struts, or else I could have helped you.


ZORAM<br />"If it's true that we are here to help others,<br />then what exactly are the others here for?"
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: validwhen not working for String comparision