You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Steven Gong <st...@gmail.com> on 2004/11/04 16:21:39 UTC
Problem using JXTemplate Generator to show a form(NOT_FOUND is not a function)
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.
Regards,
Steven Gong
----------------
[1] http://www.mail-archive.com/users@cocoon.apache.org/msg19621.html
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Problem using JXTemplate Generator to show a form(NOT_FOUND is not a function)
Posted by Steven Gong <st...@gmail.com>.
Hi,
I've noticed that the doc on cocoon.apache.org is out-of-date. The
import should be jx-macros.xml not template.jx. I found this on new
samples of 2.1.6-dev. :-)
Regards,
Steven Gong
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Problem using JXTemplate Generator to show a form(NOT_FOUND is not a function)
Posted by Steven Gong <st...@gmail.com>.
On Thu, 04 Nov 2004 16:37:42 +0100, Leszek Gawron <lg...@mobilebox.pl> wrote:
> Are you using latest svn version? Sylvain has commited some patches to
> template.jx lately
Oh, I just updated the latest svn version on BRANCH_2_1_X and it seems
the problem remains. :-(
Regards,
Steven Gong
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Problem using JXTemplate Generator to show a form(NOT_FOUND is
not a function)
Posted by Leszek Gawron <lg...@mobilebox.pl>.
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