You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2009/12/14 16:39:26 UTC
svn commit: r890373 -
/myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js
Author: lofwyr
Date: Mon Dec 14 15:39:26 2009
New Revision: 890373
URL: http://svn.apache.org/viewvc?rev=890373&view=rev
Log:
hotfix: make submit work
Modified:
myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js
Modified: myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js?rev=890373&r1=890372&r2=890373&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js (original)
+++ myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js Mon Dec 14 15:39:26 2009
@@ -335,7 +335,7 @@
this.isSubmit = false;
Tobago.action.value = oldAction;
Tobago.form.target = oldTarget;
- return;
+ return false;
}
}
var hidden = Tobago.element("tobago::partialIds");
@@ -347,6 +347,7 @@
clientDimension.value = document.body.clientWidth + ";" + document.body.clientHeight;
this.form.appendChild(clientDimension);
Tobago.onBeforeUnload();
+ return true;
},
onBeforeUnload: function() {
@@ -550,6 +551,7 @@
}
Tobago.oldTransition = Tobago.transition;
Tobago.transition = transition && !target;
+// new
var onSubmitResult = Tobago.onSubmit();
if (onSubmitResult) {
// LOG.debug("submit form with action: " + Tobago.action.value);
@@ -563,6 +565,20 @@
this.isSubmit = false;
Tobago.Transport.pageSubmited = false;
}
+// old
+/*
+ Tobago.onSubmit();
+ // LOG.debug("submit form with action: " + Tobago.action.value);
+ Tobago.form.submit();
+ Tobago.action.value = oldAction;
+ if (target) {
+ Tobago.form.target = oldTarget;
+ }
+ if (target || !transition) {
+ this.isSubmit = false;
+ Tobago.Transport.pageSubmited = false;
+ }
+*/
}
}, true);
},