CForms validation in Cocoon-2.1.12

Barbara Slupik <[email protected]>
Newsgroups gmane.text.xml.cocoon.user
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.