Author: nbelaevski
Date: 2008-09-04 15:03:10 -0400 (Thu, 04 Sep 2008)
New Revision: 10312
Modified:
trunk/framework/impl/src/main/java/org/ajax4jsf/renderkit/AjaxRendererUtils.java
trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js
Log:
https://jira.jboss.org/jira/browse/RF-4397
Modified:
trunk/framework/impl/src/main/java/org/ajax4jsf/renderkit/AjaxRendererUtils.java
===================================================================
---
trunk/framework/impl/src/main/java/org/ajax4jsf/renderkit/AjaxRendererUtils.java 2008-09-04
18:54:50 UTC (rev 10311)
+++
trunk/framework/impl/src/main/java/org/ajax4jsf/renderkit/AjaxRendererUtils.java 2008-09-04
19:03:10 UTC (rev 10312)
@@ -117,10 +117,6 @@
public static final String AJAX_ABORT_ATTR = "ignoreDupResponses";
- public static final String AJAX_PROCESS_ATTR = "process";
-
- public static final String AJAX_PROCESS_PARAMETER_NAME = "process";
-
public static final String AJAX_SINGLE_PARAMETER_NAME = "ajaxSingle";
/**
@@ -222,9 +218,6 @@
// control )
if (ajaxSingle ) {
parameters.put(AJAX_SINGLE_PARAMETER_NAME,
targetComponent.getClientId(facesContext));
- if (componentAttributes.get(AJAX_PROCESS_ATTR) != null) {
- parameters.put(AJAX_PROCESS_PARAMETER_NAME, true);
- }
// options.put("single", JSReference.TRUE);
if (input) {
options.put("control", JSReference.THIS);
Modified: trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js
===================================================================
--- trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js 2008-09-04 18:54:50 UTC
(rev 10311)
+++ trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js 2008-09-04 19:03:10 UTC
(rev 10312)
@@ -771,25 +771,14 @@
};
};
var tosend = new A4J.Query(containerId, form);
- if(options.control){
- tosend.appendControl(options.control,true);
- };
-
- var hiddenOnly;
+ tosend.appendFormControls(options.single, options.control);
+ //appending options.control moved to appendFormControls
+ //if(options.control){
+ // tosend.appendControl(options.control,true);
+ //};
if(options.parameters){
tosend.appendParameters(options.parameters);
- var single = options.parameters.ajaxSingle;
- var process = options.parameters.process;
-
- // send hidden controls if only 'ajaxSingle' set RF-4025
- if (single && !process) {
- hiddenOnly = true;
- } else {
- hiddenOnly = false;
- }
};
- tosend.appendFormControls(hiddenOnly);
-
if(options.eventsCount){
tosend.appendParameter("AJAX:EVENTS_COUNT",options.eventsCount);
};
@@ -1329,13 +1318,19 @@
},
// Append all non-hidden controls from form to query.
- appendFormControls : function(hiddenOnly){
+ appendFormControls : function(hiddenOnly, actionControl){
try {
var elems = this._form.elements;
if(elems){
var k = 0;
for ( k=0;k<elems.length;k++ ) {
var element=elems[k];
+
+ //skip actionControl, we're going to add it later
+ if (element == actionControl) {
+ continue;
+ }
+
try {
if( !hiddenOnly || element.type == "hidden") {
this.appendControl(element,false) ;
@@ -1348,6 +1343,10 @@
} catch(e) {
LOG.warn("Error with append form controls to query "+e)
}
+
+ if (actionControl) {
+ this.appendControl(actionControl, true);
+ }
},
// append map of parameters to query.