Hi,

I am having problem in using Form validation and JPath.
What i am trying to do is
1) validating a form with the Form validation provided by Cocoon.
2)in case of sucess in Form validation, it is calling javascript function
and which in turn is sending the same page in case of error 
now i am using jpath to extract the error message which is giving error
because "errorMsg" can not be null during form validation



============================================================================
========
<map:match pattern="changePwd">
           <map:act type="formval">
                   <map:parameter name="descriptor" value="descriptor.xml"/>
                   <map:parameter name="validate-set"
value="data_constraints"/>
                   <!--+
                       | this is the success case
                       +-->
                   <map:call function="change_Password"/>
             </map:act>
             <!--+
                      | this branch contains the failed validation.
                      | Since the "success" pipeline ends with a serializer,
the following is only 
                      | applied if validation has not been successful.
                      |
                      +-->
             <map:call resource="dynamic-page">
                           <map:parameter name="target"
value="changePassword"/>
                           <map:parameter name="remove" value="{0}"/>
             </map:call>
             
             
             <map:call function="change_Password"/>

============================================================================
===============


<?xml version="1.0" encoding="iso-8859-1"?> 

<xsp:page language="java"
          xmlns:xsp="http://apache.org/xsp";
          xmlns:jpath="http://apache.org/xsp/jpath/1.0";>
          
        <document>
          <resources>
              <resource type="file" href="prefs.js">Flowscript</resource>
          </resources>
          <header>
              <title>Change Password</title>
          </header>

          <body>
                  <jpath:if test="errorMsg">
                        <strong><jpath:value-of select="errorMsg"/></strong>
                  </jpath:if>
                  <form>
=====================================================================
Regards
H. vardhan

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.614 / Virus Database: 393 - Release Date: 3/5/2004
 

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

Reply via email to