DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=34224>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=34224


[EMAIL PROTECTED] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WORKSFORME




------- Additional Comments From [EMAIL PROTECTED]  2005-04-01 07:29 -------
I don't believe theres anything wrong with your 'test' expression. I've just 
added a validwhen page to the struts-examples webapp and I used your 
expression, just changing the field names - and it worked as expected.

>From what you describe though, it appears that whatever you enter in the 
merchantId doesn't make any difference to whether it passes or fails. Basically 
if you select something for the merchantLevId it fails and if you don't it 
passes. That makes me think that even when you think you're entering something 
in the merchantId - its still actually null. Can you check that when you enter 
something in merchantId it is actually getting populated in your ActionForm.

Another option is to try using a custom validwhen message (rather than the 
default errors.required) - just to make sure it is the validwhen validation 
thats failing, something like...

<field property="merchantId" depends="validwhen">
   <msg name="validwhen" key="errors.validwhen"/>
<filed>

Another problem with validwhen is that if an Exception occurs it just carries 
on and passes validation. I don't think thats the case here, but I've just 
changed struts so that this doesn't happen and Exceptions are properly logged.

If you try out the latest build you could have a look at the new 'validwhen' 
page I've added to struts-examples and also see if the changes to Exception 
handling indicate there are any problems.

The nightly build for the Struts 1.2.x series, currently isn't working 
properly, but I've uploaded a development build so that people could try out 
the changes I made here:

http://people.apache.org/~niallp/dist/struts-1.2.x/

I've also made the changes to the current 1.3.x version, and thats available 
here...

http://cvs.apache.org/builds/struts/maven/nightly/

Having said all that, this is really a question for the struts user list. 
Please don't open bugzilla tickets unless you've proved its a bug rather than 
your cock up or you've at least pursued it on the user list first. Since I've 
verified that what you've posted does actually work I'm closing this 
as "WORKSFORME".

Niall


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to