[ http://issues.apache.org/jira/browse/COCOON-1720?page=all ]
Jean-Baptiste Quenot reassigned COCOON-1720:
--------------------------------------------
Assign To: Jean-Baptiste Quenot
> Form.js overwrites the CFormsInstance attribute
> -----------------------------------------------
>
> Key: COCOON-1720
> URL: http://issues.apache.org/jira/browse/COCOON-1720
> Project: Cocoon
> Type: Bug
> Components: Blocks: Forms
> Versions: 2.1.9-dev (current SVN)
> Reporter: Jean-Baptiste Quenot
> Assignee: Jean-Baptiste Quenot
> Attachments: 20051214-Form.js
>
> In Form.js the function showForm() stores the form in an attribute of the
> viewdata (the optional JS object passed by the user) called CFormsInstance .
> When invoking showForm() on two different forms but with the same viewdata,
> Form.js overwrites the attribute in viewdata. When resuming the continuation
> of the first form, an error occurs because the second form is referenced in
> the viewdata, and of course it doesn't have the same set of widgets.
> In other words: when the flow attributes are shared across multiple
> showForm(), Form.js overwrites the CFormsInstance attribute, which causes
> failure when reactivating the continuation of a previous screen.
> Please see attached patch: the solution is to make a copy of the JS object.
> *** There's also an improvement possible in Form.js provided in the same
> patch: to add a sendForm() function that does the same as showForm() except
> that no continuation is produced, to simplify development when no
> continuation is needed, and to reduce memory usage. ***
--
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