You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by we...@apache.org on 2013/07/25 17:37:42 UTC
svn commit: r1507017 -
/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js
Author: weber
Date: Thu Jul 25 15:37:42 2013
New Revision: 1507017
URL: http://svn.apache.org/r1507017
Log:
TOBAGO-1266 - Add options to client event listeners: move listener call to update method
Modified:
myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js
Modified: myfaces/tobago/trunk/tobago-theme/tobago-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/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js?rev=1507017&r1=1507016&r2=1507017&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js Thu Jul 25 15:37:42 2013
@@ -776,30 +776,6 @@ var Tobago = {
reloadComponent: function(source, id, actionId, options) {
- var listenerOptions = {
- source: source,
- ajaxComponentIds: id,
- actionId: actionId,
- options: options
- };
-
- var result = true; // Do not continue if any function returns false
- for (var order = 0; order < Tobago.listeners.beforeSubmit.length; order++) {
- var list = Tobago.listeners.beforeSubmit[order];
- for (var i = 0; i < list.length; i++) {
- result = list[i](listenerOptions);
- if (!result) {
- break;
- }
- }
- }
- if (result != false && jQuery.isFunction(Tobago.applicationOnsubmit)) {
- result = Tobago.applicationOnsubmit(listenerOptions);
- }
- if (!result) {
- return false;
- }
-
var container = this.ajaxComponents[id];
if (typeof container == 'string') {
if (!actionId) {
@@ -2067,12 +2043,23 @@ Tobago.Updater = {
actionId: actionId,
options: options
};
- if (jQuery.isFunction(Tobago.applicationOnsubmit)) {
- var result = Tobago.applicationOnsubmit(listenerOptions);
- if (!result) {
- return;
+
+ var result = true; // Do not continue if any function returns false
+ for (var order = 0; order < Tobago.listeners.beforeSubmit.length; order++) {
+ var list = Tobago.listeners.beforeSubmit[order];
+ for (var i = 0; i < list.length; i++) {
+ result = list[i](listenerOptions);
+ if (!result) {
+ break;
+ }
}
}
+ if (result != false && jQuery.isFunction(Tobago.applicationOnsubmit)) {
+ result = Tobago.applicationOnsubmit(listenerOptions);
+ }
+ if (!result) {
+ return false;
+ }
var requestOptions = Tobago.extend({}, this.options);
if (options) {