You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Volker Schneider <vo...@danet.de> on 2002/05/13 12:49:46 UTC
FormValidator says always OK, but it is not!
Dear colleagues,
I'm using a form-validator with the validation-File (validation.xml) as
follows:
<?xml version="1.0" standalone="yes"?>
<root>
<parameter name="startzip" type="string" min-len="5" max-len="5"/>
</root>
And I'm using the "startzip" input field im my form.
I have this action-set
<map:action-sets>
<map:action-set name="xy">
<map:act type="form-validator" action="calculate">
<map:act type="xyCalculateAction" action="calculate"/>
</map:act>
</map:action-set>
</map:action-sets>
which is used in this pipeline
<map:match pattern="xyAction">
<map:act set="xy">
<!-- parameters for form validation -->
<map:parameter name="descriptor"
value="xy/xml/validation.xml"/>
<map:parameter name="form-descriptor"
value="xy/xml/validation.xml"/>
<map:select type="parameter">
<map:parameter name="parameter-selector-test" value="{return}"/>
<map:when test="OK">
<map:call resource="viewpage">
<map:parameter name="nextxsp" value="xy4"/>
<map:parameter name="nextxsl" value="xy"/>
</map:call>
</map:when>
<map:when test="LOGIC_ERROR">
<map:call resource="viewpage">
<map:parameter name="nextxsp" value="ErrorPage"/>
<map:parameter name="nextxsl" value="ErrorStylesheet"/>
</map:call>
</map:when>
</map:select>
</map:act>
<!-- ==== Error Page for FormValidator ==== -->
<map:call resource="viewpage">
<map:parameter name="nextxsp" value="FieldError"/>
<map:parameter name="nextxsl" value="ErrorStylesheet"/>
</map:call>
</map:match>
If I put a wrong value (4 characters long) or a correct value (5 characters
long) into my "startzip"-Field, log file says:
DEBUG (2002-05-13) 12:34.09:544
[sitemap.action.form-validator](/Cocoon/xyAction)
Servlet.Engine.Transports:10/AbstractComplementaryConfigurableAction: Using
cached configuration for xy/xml/validation.xml
DEBUG (2002-05-13) 12:34.09:544
[sitemap.action.form-validator](/Cocoon/xyAction)
Servlet.Engine.Transports:10/FormValidatorAction: All form params
successfully validated
I always get a successful validation. My guess is, that I have something
more to say in the sitemap possibly about the form or the parameter to be
validated, but what?
Can anybody help me please?
Thank you, best regards
- Volker -
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
RE: FormValidator says always OK, but it is not!
Posted by Volker Schneider <vo...@danet.de>.
Hi colleagues,
sorry, I forgot <map:parameter name="validate" value="startzip"/>
and then I get the exception Hiloliddin Karimov told us about (Vadim said,
that it is fixed in the CVS). So I hope, that I can get it from CVS...
Best regards
- Volker -
-----Original Message-----
From: Volker Schneider [mailto:volker.schneider@danet.de]
Sent: Montag, 13. Mai 2002 12:50
To: cocoon-users@xml.apache.org
Subject: FormValidator says always OK, but it is not!
Dear colleagues,
I'm using a form-validator with the validation-File (validation.xml) as
follows:
<?xml version="1.0" standalone="yes"?>
<root>
<parameter name="startzip" type="string" min-len="5" max-len="5"/>
</root>
And I'm using the "startzip" input field im my form.
I have this action-set
<map:action-sets>
<map:action-set name="xy">
<map:act type="form-validator" action="calculate">
<map:act type="xyCalculateAction" action="calculate"/>
</map:act>
</map:action-set>
</map:action-sets>
which is used in this pipeline
<map:match pattern="xyAction">
<map:act set="xy">
<!-- parameters for form validation -->
<map:parameter name="descriptor"
value="xy/xml/validation.xml"/>
<map:parameter name="form-descriptor"
value="xy/xml/validation.xml"/>
<map:select type="parameter">
<map:parameter name="parameter-selector-test" value="{return}"/>
<map:when test="OK">
<map:call resource="viewpage">
<map:parameter name="nextxsp" value="xy4"/>
<map:parameter name="nextxsl" value="xy"/>
</map:call>
</map:when>
<map:when test="LOGIC_ERROR">
<map:call resource="viewpage">
<map:parameter name="nextxsp" value="ErrorPage"/>
<map:parameter name="nextxsl" value="ErrorStylesheet"/>
</map:call>
</map:when>
</map:select>
</map:act>
<!-- ==== Error Page for FormValidator ==== -->
<map:call resource="viewpage">
<map:parameter name="nextxsp" value="FieldError"/>
<map:parameter name="nextxsl" value="ErrorStylesheet"/>
</map:call>
</map:match>
If I put a wrong value (4 characters long) or a correct value (5 characters
long) into my "startzip"-Field, log file says:
DEBUG (2002-05-13) 12:34.09:544
[sitemap.action.form-validator](/Cocoon/xyAction)
Servlet.Engine.Transports:10/AbstractComplementaryConfigurableAction: Using
cached configuration for xy/xml/validation.xml
DEBUG (2002-05-13) 12:34.09:544
[sitemap.action.form-validator](/Cocoon/xyAction)
Servlet.Engine.Transports:10/FormValidatorAction: All form params
successfully validated
I always get a successful validation. My guess is, that I have something
more to say in the sitemap possibly about the form or the parameter to be
validated, but what?
Can anybody help me please?
Thank you, best regards
- Volker -
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>