cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leszek Gawron <lgaw...@mobilebox.pl>
Subject Re: Problem using JXTemplate Generator to show a form(NOT_FOUND is not a function)
Date Thu, 04 Nov 2004 15:37:42 GMT
Steven Gong wrote:
> Hi,
> I think it's not a new problem and I've found someone posted the same
> problem here long ago[1].
> I want to move my code from xml+form transformer to jx and followed
> what the userdoc mentioned (just clear the form transformer in
> sitemap, add a import line in original template) and waited for the
> page to show but it didn't :(
> I am using 2.1.6-dev and the same problem occured on 2.1.5.
> I think I must have made a mistake somewhere. Plz help me out. Below
> is the detailed info:
> * The page shows:
> org.apache.cocoon.ProcessingException: Failed to execute pipeline.:
> file:/D:/projects/ismp/svnroot/portal/trunk/msp/opportal/sysmanagement/../rolemanagement/forms/roleinfo_template.jx:29:68:TypeError:
> org.mozilla.javascript.UniqueTag@780515: NOT_FOUND is not a function.
> (resource://org/apache/cocoon/components/flow/javascript/fom/fom_system.js;
> line 19)
> * The form template is like thus:
> <html xmlns:ft="http://apache.org/cocoon/forms/1.0#template"
>     xmlns:fi="http://apache.org/cocoon/forms/1.0#instance"
>     xmlns:jx="http://apache.org/cocoon/templates/jx/1.0">
> <jx:import uri="resource://org/apache/cocoon/forms/generation/template.jx"/>
> .....
> <ft:form-template action="${cocoon.continuation.id}" method="POST">  
> <!-- error location-->
>      <table width="96%" border="0" align="center" cellpadding="0"
>          cellspacing="0">
> .....
> * The sitemap is like thus:
>           <map:match pattern="roleinfo-form">
>                 <map:generate type="jx" src="forms/roleinfo_template.jx"/>
>                 <map:transform src="../resources/forms-samples-styling.xsl"/>
>                 <map:serialize/>
>           </map:match>
> * The js:
> function roleinfo_fun(form)
> {
>     // parse the document to a DOM-tree
>     var document = loadDocument("cocoon:/roleinfo-list-data-fun");
> 
>     // bind the document data to the form
>     form.load(document);
> 
>     // show the form to the user until it is validated successfully
>     form.showForm("roleinfo-form");
> }
> NOTE: It worked fine with form transformer.
Are you using latest svn version? Sylvain has commited some patches to 
template.jx lately


-- 
Leszek Gawron                                      lgawron@mobilebox.pl
Project Manager                                    MobileBox sp. z o.o.
+48 (61) 855 06 67                              http://www.mobilebox.pl
mobile: +48 (501) 720 812                       fax: +48 (61) 853 29 65

Mime
View raw message