You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by th...@apache.org on 2005/10/14 14:55:02 UTC
svn commit: r321097 - in /lenya/trunk/src:
modules/cforms/usecases/dynamicrepeater_template.xml
webapp/lenya/usecases/usecases.js
Author: thorsten
Date: Fri Oct 14 05:54:55 2005
New Revision: 321097
URL: http://svn.apache.org/viewcvs?rev=321097&view=rev
Log:
Workaround bugfix for the cform example. The problem is that ajax='true' will cause on submit of the form the lost of the usecase.js flow. I wrote to the cocoon-user list regarding this issue.
Modified:
lenya/trunk/src/modules/cforms/usecases/dynamicrepeater_template.xml
lenya/trunk/src/webapp/lenya/usecases/usecases.js
Modified: lenya/trunk/src/modules/cforms/usecases/dynamicrepeater_template.xml
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/modules/cforms/usecases/dynamicrepeater_template.xml?rev=321097&r1=321096&r2=321097&view=diff
==============================================================================
--- lenya/trunk/src/modules/cforms/usecases/dynamicrepeater_template.xml (original)
+++ lenya/trunk/src/modules/cforms/usecases/dynamicrepeater_template.xml Fri Oct 14 05:54:55 2005
@@ -26,11 +26,11 @@
</page:head>
<page:body>
- <ft:form-template method="POST" ajax="true">
+ <ft:form-template method="POST" ajax="false">
<input type="hidden" name="lenya.continuation" value="${continuation.id}"/>
<input type="hidden" name="lenya.usecase"
value="${request.getParameter('lenya.usecase')}"/>
-
+ <input type="hidden" name="lenya.submit" value="ok"/>
<p>
This is an example of how dynamic templates (using the JX macros) allow to change the
page structure depending on the form contents. By adding or removing rows in the repeater
Modified: lenya/trunk/src/webapp/lenya/usecases/usecases.js
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/webapp/lenya/usecases/usecases.js?rev=321097&r1=321096&r2=321097&view=diff
==============================================================================
--- lenya/trunk/src/webapp/lenya/usecases/usecases.js (original)
+++ lenya/trunk/src/webapp/lenya/usecases/usecases.js Fri Oct 14 05:54:55 2005
@@ -171,6 +171,8 @@
}
// form template
form.showForm(viewUri, {"usecase" : proxy});
+//DEBUG ajax="true"
+// print("form.showForm after");
}
else{
cocoon.sendPageAndWait(viewUri, {
@@ -215,7 +217,7 @@
passRequestParameters(flowHelper, usecase);
usecase.advance();
//HEADSUP: Cform do not allow id="submit" anymore. Use id="ok" for now (till it is settled on cocoon-dev).
- if (cocoon.request.getParameter("submit")||cocoon.request.getParameter("ok")) {
+ if (cocoon.request.getParameter("submit")||cocoon.request.getParameter("lenya.submit")) {
usecase.checkExecutionConditions();
if (! usecase.hasErrors()) {
if (view.getViewType()=="cforms"){
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org