cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Barbara Slupik <barbara_slu...@wro.vectranet.pl>
Subject CForms validation in Cocoon-2.1.12
Date Wed, 04 Dec 2013 11:00:35 GMT
Hello

I am trying to upgrade from Cocoon-2.1.11 to Cocoon 2.1.12.

I have a problem with CForms validation - the ! error icon validation- 
message.gif is not displayed. Dojo debug message is:

DEBUG: dojo.widget.Parse: error: [Exception... "Node cannot be  
inserted at the specified point in the hierarchy" code: "3" nsresult:  
"0x80530003 (NS_ERROR_DOM_HIERARCHY_REQUEST_ERR)" location: "http://172.16.1.5/branch/_cocoon/resources/dojo/dojo.js

  Line: 173"]

My form definition:
         <fd:field ...>
           <fd:validation>
             <fd:javascript>
               if (my condition) {
                 widget.setValidationError(new  
Packages.org.apache.cocoon.forms.validation.ValidationError("my error  
message",[],[true]));
                 return false;
               }
               return true;
             </fd:javascript>
           </fd:validation>
         </fd:field>

My sitemap:
       <map:transformers default="xsltc">...</map:transformers>

       <map:match pattern="*-display">
         <map:generate type="jx" src="forms/{1}_tmpl.xml">
           <map:parameter name="locale" value="{session-attr:locale}"/>
         </map:generate>
         <map:transform type="browser-update"/>
         <map:transform type="i18n"><map:parameter name="locale"  
value="{session-attr:locale}"/></map:transform>
         <map:transform type="xslt" src="stylesheets/forms-styling.xsl">
           <map:parameter name="resources-uri"  
value="{request:contextPath}/_cocoon/resources"/>
           <map:parameter name="dojo-locale" value="{session- 
attr:locale}"/>
           <map:parameter name="dojo-debug" value="true"/>
         </map:transform>
         <map:select type="ajax-request">
           <map:when test="true">
             <map:serialize type="xml"/>
           </map:when>
           <map:otherwise>
	    ...
             <map:serialize type="html"/>
           </map:otherwise>
         </map:select>
       </map:match>

The same thing works in Cocoon-2.1.11. Changing default transformer to  
xslt does not make any difference.

Does anyone know what is wrong with it and how to fix it?

Thanks

Barbara


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message