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

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17593

Allow to pass additional parameters to Flow+XMLForm functions

           Summary: Allow to pass additional parameters to Flow+XMLForm
                    functions
           Product: Cocoon 2
           Version: Current CVS
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: core
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


The attached patch allows to pass additional parameters from the sitemap to a
Javascript function indirectly invoked via the xmlForm function. This might be
useful when you want to show a form for editing some entity whose identifier is
specified in the URI: http://localhost/edit-entity?id=XYZ.

Here is a sitemap snippet:
        
<map:match pattern="edit-entity">
 <map:call function="xmlForm">
  <map:parameter name="xml-form-function" value="editEntity"/>
  <map:parameter name="xml-form-id" value="entity-form"/>
  <map:parameter name="xml-form-validator-schema-ns"   
    value="http://www.ascc.net/xml/schematron"/>
  <map:parameter name="xml-form-validator-schema"       
    value="schematron/entity-schema.xml"/>
  <map:parameter name="id" value="{request-param:id}"/>
 </map:call>
</map:match>

The editEntity function should be declared as follows:

function editEntity(xform, id) { ... }

Reply via email to