You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by "David Crossley (JIRA)" <ji...@apache.org> on 2006/03/01 07:46:40 UTC
[jira] Updated: (COCOON-1418) [PATCH] CForm definitions using
JXTemplate
[ http://issues.apache.org/jira/browse/COCOON-1418?page=all ]
David Crossley updated COCOON-1418:
-----------------------------------
Bugzilla Id: (was: 33237)
Other Info: [Patch available]
Description:
This is a patch that I needed to implement for a project I'm working on and that
someone else may find useful. I have CForm definitions being created with a
JXTemplate instead of a static XML file and needed to be able to pass some
objects through to the JXTemplate. This patch allows me to create forms like:
var form = new Form("cocoon:/form1.jx", {"bean" : bean});
form.createBinding("cocoon:/form1Bind.jx", null, {"bean" : bean});
and then from within the JXTemplate I can use the objects like ${bean.foo}
There's probably a better way to do the changes I made in Form.js, but this is
what I'm using in my project at the moment so hopefully someone will find it useful.
was:
This is a patch that I needed to implement for a project I'm working on and that
someone else may find useful. I have CForm definitions being created with a
JXTemplate instead of a static XML file and needed to be able to pass some
objects through to the JXTemplate. This patch allows me to create forms like:
var form = new Form("cocoon:/form1.jx", {"bean" : bean});
form.createBinding("cocoon:/form1Bind.jx", null, {"bean" : bean});
and then from within the JXTemplate I can use the objects like ${bean.foo}
There's probably a better way to do the changes I made in Form.js, but this is
what I'm using in my project at the moment so hopefully someone will find it useful.
> [PATCH] CForm definitions using JXTemplate
> ------------------------------------------
>
> Key: COCOON-1418
> URL: http://issues.apache.org/jira/browse/COCOON-1418
> Project: Cocoon
> Type: Improvement
> Components: Blocks: Forms
> Versions: 2.1.8
> Environment: Operating System: All
> Platform: PC
> Reporter: Adam Walsh
> Assignee: Jean-Baptiste Quenot
> Priority: Minor
> Attachments: Form.js.diff, FormUtil.java, JXTemplateGenerator.java.diff
>
> This is a patch that I needed to implement for a project I'm working on and that
> someone else may find useful. I have CForm definitions being created with a
> JXTemplate instead of a static XML file and needed to be able to pass some
> objects through to the JXTemplate. This patch allows me to create forms like:
> var form = new Form("cocoon:/form1.jx", {"bean" : bean});
> form.createBinding("cocoon:/form1Bind.jx", null, {"bean" : bean});
> and then from within the JXTemplate I can use the objects like ${bean.foo}
> There's probably a better way to do the changes I made in Form.js, but this is
> what I'm using in my project at the moment so hopefully someone will find it useful.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira