You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by bu...@apache.org on 2005/01/25 14:48:59 UTC

DO NOT REPLY [Bug 33237] New: - [PATCH] CForm definitions using JXTemplate

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=33237>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=33237

           Summary: [PATCH] CForm definitions using JXTemplate
           Product: Cocoon 2
           Version: Current SVN 2.1
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: CocoonForms
        AssignedTo: dev@cocoon.apache.org
        ReportedBy: adam@grummen.net


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.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.