cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Bruyn (JIRA)" <j...@apache.org>
Subject [jira] Created: (COCOON-1817) Dynamic forms with libraries: java.net.MalformedURLException
Date Tue, 28 Mar 2006 23:21:18 GMT
Dynamic forms with libraries:  java.net.MalformedURLException
-------------------------------------------------------------

         Key: COCOON-1817
         URL: http://issues.apache.org/jira/browse/COCOON-1817
     Project: Cocoon
        Type: Bug
  Components: Blocks: Forms  
    Versions: 2.1.8    
    Reporter: Bill Bruyn
 Attachments: cocoon-scratchpad.zip

I am trying to build forms dynamically from a jx template, and am able to do so like this:

    var form = new Form("cocoon:/forms/" + name + ".jx"); 

But I get MalformedURLExceptions[1] at form instantiation when I try it like this:

    var obj = "Here is some bizData to be used in building the dynamic form from a JX template...";
    var model = pipelines.processToDOM("forms/" + name + ".jx", {bizData : obj});
    var form = new Form(model.getDocumentElement());

and my form definition references a library:

<fd:form  xmlns:fd="http://apache.org/cocoon/forms/1.0#definition">
  <fd:widgets>
    
    <fd:import prefix="lib" uri="cocoon://form-libraries/model/sample.xml"/>    
    <fd:expand id="lib:account"/>
    
  </fd:widgets>
</fd:form>

Attached is a small app that illustrates the problem.  You should be able to unzip it and

1)  modify build.properties for your environment
2)  ant cocoon:get
3)  ant build

http://localhost:8080/scratchpad/sandbox should work as-is.  To induce the error, edit sandbox/flow/main.js
(see comments inline)

-- 
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


Mime
View raw message