Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

validwhen not working for String comparision

 
Nishita Jain
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Zoram Paul
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Nishita,
I am very new to struts, or else I could have helped you.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic