Author: nbelaevski
Date: 2009-08-20 12:52:34 -0400 (Thu, 20 Aug 2009)
New Revision: 15242
Added:
root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/AjaxEventOptions.java
Modified:
root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/AjaxRendererUtils.java
root/framework/trunk/impl/src/main/java/org/richfaces/context/PartialViewContextFactoryImpl.java
root/framework/trunk/impl/src/main/resources/META-INF/resources/richfaces.js/4_0_0.js
root/ui/trunk/components/core/src/main/java/org/ajax4jsf/renderkit/AjaxBeahaviorRenderer.java
root/ui/trunk/components/core/src/main/java/org/richfaces/renderkit/AjaxFunctionRendererBase.java
Log:
AjaxRendererUtils refactoring
a4j:push bug fixing
Added:
root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/AjaxEventOptions.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/AjaxEventOptions.java
(rev 0)
+++
root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/AjaxEventOptions.java 2009-08-20
16:52:34 UTC (rev 15242)
@@ -0,0 +1,97 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.ajax4jsf.renderkit;
+
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+import org.ajax4jsf.javascript.ScriptStringBase;
+import org.ajax4jsf.javascript.ScriptUtils;
+
+/**
+ * @author Nick Belaevski
+ * @since 4.0
+ */
+public class AjaxEventOptions extends ScriptStringBase {
+
+ /**
+ *
+ */
+ public static final String PARAMETERS = "parameters";
+
+ private Map<String, Object> options = new HashMap<String, Object>();
+
+ public void appendScript(StringBuffer functionString) {
+ functionString.append(ScriptUtils.toScript(options));
+ }
+
+ public boolean isEmpty() {
+ return options.isEmpty();
+ }
+
+ public Object get(String optionName) {
+ return options.get(optionName);
+ }
+
+ public void set(String optionName, Object optionValue) {
+ options.put(optionName, optionValue);
+ }
+
+ public void remove(String optionName) {
+ options.remove(optionName);
+ }
+
+ @SuppressWarnings("unchecked")
+ public Map<String, Object> getParameters() {
+ Map<String, Object> parameters = (Map<String, Object>)
options.get(PARAMETERS);
+ if (parameters == null) {
+ parameters = new LinkedHashMap<String, Object>();
+ options.put(PARAMETERS, parameters);
+ }
+
+ return parameters;
+ }
+
+ @SuppressWarnings("unchecked")
+ public Object getParameter(String parameterName) {
+ Object result = null;
+ Map<String, Object> parameters = (Map<String, Object>)
options.get(PARAMETERS);
+ if (parameters != null) {
+ result = parameters.get(parameterName);
+ }
+
+ return result;
+ }
+
+ public void setParameter(String parameterName, Object parameterValue) {
+ getParameters().put(parameterName, parameterValue);
+ }
+
+ @SuppressWarnings("unchecked")
+ public void removeParameter(String parameterName) {
+ Map<String, Object> parameters = (Map<String, Object>)
options.get(PARAMETERS);
+ if (parameters != null) {
+ parameters.remove(parameterName);
+ }
+ }
+}
Modified:
root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/AjaxRendererUtils.java
===================================================================
---
root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/AjaxRendererUtils.java 2009-08-20
16:40:21 UTC (rev 15241)
+++
root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/AjaxRendererUtils.java 2009-08-20
16:52:34 UTC (rev 15242)
@@ -290,185 +290,183 @@
}
}
- public static Map<String, Object> buildEventOptions(FacesContext facesContext,
+ public static AjaxEventOptions buildEventOptions(FacesContext facesContext,
UIComponent component) {
- Map<String,Object> options = new LinkedHashMap<String, Object>();
- appendParameters(facesContext, component, options);
-
- String clientId = component.getClientId(facesContext);
- options.put(clientId, clientId);
- return options;
+ AjaxEventOptions ajaxEventOptions = new AjaxEventOptions();
+ appendParameters(facesContext, component, ajaxEventOptions.getParameters());
+
+ return ajaxEventOptions;
}
- public static Map<String, Object> buildEventOptions(FacesContext facesContext,
- UIComponent uiComponent, Map<String, Object> params) {
-
- return buildEventOptions(facesContext, uiComponent, params, false);
- }
+// public static AjaxEventOptions buildEventOptions(FacesContext facesContext,
+// UIComponent uiComponent, Map<String, Object> params) {
+//
+// return buildEventOptions(facesContext, uiComponent, params, false);
+// }
/**
* @param facesContext
* @param uiComponent
* @return
*/
- public static Map<String, Object> buildEventOptions(FacesContext facesContext,
- UIComponent uiComponent, Map<String, Object> params, boolean
omitDefaultActionUrl) {
- String clientId = uiComponent.getClientId(facesContext);
- Map<String, Object> componentAttributes = uiComponent.getAttributes();
- Map<String, Object> options = new HashMap<String, Object>();
-
- UIComponent nestingContainer = (UIComponent) findAjaxContainer(
- facesContext, uiComponent);
- String containerClientId = nestingContainer.getClientId(facesContext);
- if (containerClientId != null &&
!AjaxViewRoot.ROOT_ID.equals(containerClientId)) {
- options.put("containerId", containerClientId);
- }
-
- Map<String, Object> parameters = new HashMap<String, Object>();
- UIComponent targetComponent = (uiComponent instanceof
AjaxSupport)?uiComponent.getParent():uiComponent;
- // UIForm form = getNestingForm(uiComponent);
- // "input" - if assigned to html input element.
- boolean input = targetComponent instanceof EditableValueHolder;
- // Action component - button etc.
-// boolean action = targetComponent instanceof ActionSource;
-
- boolean ajaxSingle = Boolean.TRUE.equals(componentAttributes
- .get(AJAX_SINGLE_ATTR));
- // For input components in single mode or without form submit input
- // control )
- if (ajaxSingle ) {
- parameters.put(AJAX_SINGLE_PARAMETER_NAME,
targetComponent.getClientId(facesContext));
- // options.put("single", JSReference.TRUE);
- if (input) {
- options.put("control", JSReference.THIS);
- }
- }
- // Control value for submit
- String controlName;
- Object controlValue;
- // TODO - make compatible with JSF RI/MyFaces ? use submittedValue ( if
- // any ) for UIInput, converted value for ValueHolder.
- controlName = clientId;
- controlValue = clientId;
- parameters.put(controlName, controlValue);
- AjaxContext ajaxContext = AjaxContext.getCurrentInstance(facesContext);
-
- String ajaxActionURL = ajaxContext.getAjaxActionURL(facesContext);
- if (omitDefaultActionUrl) {
- UIComponent form = getNestingForm(uiComponent);
- if (form != null && !rendererUtils.isBooleanAttribute(form,
"ajaxSubmit")) {
- if (rendererUtils.getActionUrl(facesContext).equals(ajaxActionURL)) {
- ajaxActionURL = null;
- }
- }
- }
-
- if (ajaxActionURL != null) {
- // Setup action URL. For portlet environment, it will be different from
- // page.
- options.put("actionUrl", ajaxActionURL);
- }
-
- // Add application-wide Ajax parameters
- parameters.putAll(ajaxContext.getCommonAjaxParameters());
- // add child parameters
- appendParameters(facesContext, uiComponent, parameters);
-
- if (params != null) {
- parameters.putAll(params);
- }
-
- if (!parameters.isEmpty()) {
- options.put("parameters", parameters);
- }
- // parameter to render only current list of areas.
-// if (isAjaxLimitToList(uiComponent)) {
-// Set<? extends Object> ajaxAreas = getAjaxAreas(uiComponent);
-// Set<String> areasIds = new HashSet<String>();
-// if (null != ajaxAreas) {
-// for (Iterator<? extends Object> iter = ajaxAreas.iterator(); iter.hasNext();)
{
-// String id = (String) iter.next();
-// UIComponent comp = RendererUtils.getInstance().
-// findComponentFor(uiComponent, id);
-// if (null != comp) {
-// areasIds.add(comp.getClientId(facesContext));
-// } else {
-// areasIds.add(id);
-// }
+// public static Map<String, Object> buildEventOptions(FacesContext facesContext,
+// UIComponent uiComponent, Map<String, Object> params, boolean
omitDefaultActionUrl) {
+// String clientId = uiComponent.getClientId(facesContext);
+// Map<String, Object> componentAttributes = uiComponent.getAttributes();
+// Map<String, Object> options = new HashMap<String, Object>();
+//
+// UIComponent nestingContainer = (UIComponent) findAjaxContainer(
+// facesContext, uiComponent);
+// String containerClientId = nestingContainer.getClientId(facesContext);
+// if (containerClientId != null &&
!AjaxViewRoot.ROOT_ID.equals(containerClientId)) {
+// options.put("containerId", containerClientId);
+// }
+//
+// Map<String, Object> parameters = new HashMap<String, Object>();
+// UIComponent targetComponent = (uiComponent instanceof
AjaxSupport)?uiComponent.getParent():uiComponent;
+// // UIForm form = getNestingForm(uiComponent);
+// // "input" - if assigned to html input element.
+// boolean input = targetComponent instanceof EditableValueHolder;
+// // Action component - button etc.
+//// boolean action = targetComponent instanceof ActionSource;
+//
+// boolean ajaxSingle = Boolean.TRUE.equals(componentAttributes
+// .get(AJAX_SINGLE_ATTR));
+// // For input components in single mode or without form submit input
+// // control )
+// if (ajaxSingle ) {
+// parameters.put(AJAX_SINGLE_PARAMETER_NAME,
targetComponent.getClientId(facesContext));
+// // options.put("single", JSReference.TRUE);
+// if (input) {
+// options.put("control", JSReference.THIS);
+// }
+// }
+// // Control value for submit
+// String controlName;
+// Object controlValue;
+// // TODO - make compatible with JSF RI/MyFaces ? use submittedValue ( if
+// // any ) for UIInput, converted value for ValueHolder.
+// controlName = clientId;
+// controlValue = clientId;
+// parameters.put(controlName, controlValue);
+// AjaxContext ajaxContext = AjaxContext.getCurrentInstance(facesContext);
+//
+// String ajaxActionURL = ajaxContext.getAjaxActionURL(facesContext);
+// if (omitDefaultActionUrl) {
+// UIComponent form = getNestingForm(uiComponent);
+// if (form != null && !rendererUtils.isBooleanAttribute(form,
"ajaxSubmit")) {
+// if (rendererUtils.getActionUrl(facesContext).equals(ajaxActionURL)) {
+// ajaxActionURL = null;
// }
// }
-// options.put("affected", areasIds);
// }
- String oncomplete = getAjaxOncomplete(uiComponent);
- if (null != oncomplete) {
- options.put(ONCOMPLETE_ATTR_NAME, buildAjaxOncomplete(oncomplete));
- }
-
- String beforeupdate = getAjaxOnBeforeDomUpdate(uiComponent);
- if (null != beforeupdate) {
- options.put(ONBEFOREDOMUPDATE_ATTR_NAME, buildAjaxOnBeforeDomUpdate(beforeupdate));
- }
-
-
- String status = getAjaxStatus(uiComponent);
- if (null != status) {
- options.put("status", status);
- }
- String queue = (String) componentAttributes.get(AJAX_QUEUE_ATTR);
- String implicitQueue = null;
-
- Integer requestDelay = (Integer) componentAttributes
- .get(AJAX_DELAY_ATTR);
- if (null != requestDelay && requestDelay.intValue() > 0) {
- options.put(AJAX_DELAY_ATTR, requestDelay);
- if (null == queue) {
- implicitQueue = clientId;
- }
- }
- Boolean ignoreDupResponses = (Boolean) componentAttributes
- .get(AJAX_ABORT_ATTR);
- if (null != ignoreDupResponses && ignoreDupResponses.booleanValue()) {
- options.put(AJAX_ABORT_ATTR, JSReference.TRUE);
- if (null == queue) {
- implicitQueue = clientId;
- }
- }
+//
+// if (ajaxActionURL != null) {
+// // Setup action URL. For portlet environment, it will be different from
+// // page.
+// options.put("actionUrl", ajaxActionURL);
+// }
+//
+// // Add application-wide Ajax parameters
+// parameters.putAll(ajaxContext.getCommonAjaxParameters());
+// // add child parameters
+// appendParameters(facesContext, uiComponent, parameters);
+//
+// if (params != null) {
+// parameters.putAll(params);
+// }
+//
+// if (!parameters.isEmpty()) {
+// options.put("parameters", parameters);
+// }
+// // parameter to render only current list of areas.
+//// if (isAjaxLimitToList(uiComponent)) {
+//// Set<? extends Object> ajaxAreas = getAjaxAreas(uiComponent);
+//// Set<String> areasIds = new HashSet<String>();
+//// if (null != ajaxAreas) {
+//// for (Iterator<? extends Object> iter = ajaxAreas.iterator();
iter.hasNext();) {
+//// String id = (String) iter.next();
+//// UIComponent comp = RendererUtils.getInstance().
+//// findComponentFor(uiComponent, id);
+//// if (null != comp) {
+//// areasIds.add(comp.getClientId(facesContext));
+//// } else {
+//// areasIds.add(id);
+//// }
+//// }
+//// }
+//// options.put("affected", areasIds);
+//// }
+// String oncomplete = getAjaxOncomplete(uiComponent);
+// if (null != oncomplete) {
+// options.put(ONCOMPLETE_ATTR_NAME, buildAjaxOncomplete(oncomplete));
+// }
+//
+// String beforeupdate = getAjaxOnBeforeDomUpdate(uiComponent);
+// if (null != beforeupdate) {
+// options.put(ONBEFOREDOMUPDATE_ATTR_NAME, buildAjaxOnBeforeDomUpdate(beforeupdate));
+// }
+//
+//
+// String status = getAjaxStatus(uiComponent);
+// if (null != status) {
+// options.put("status", status);
+// }
+// String queue = (String) componentAttributes.get(AJAX_QUEUE_ATTR);
+// String implicitQueue = null;
+//
+// Integer requestDelay = (Integer) componentAttributes
+// .get(AJAX_DELAY_ATTR);
+// if (null != requestDelay && requestDelay.intValue() > 0) {
+// options.put(AJAX_DELAY_ATTR, requestDelay);
+// if (null == queue) {
+// implicitQueue = clientId;
+// }
+// }
+// Boolean ignoreDupResponses = (Boolean) componentAttributes
+// .get(AJAX_ABORT_ATTR);
+// if (null != ignoreDupResponses && ignoreDupResponses.booleanValue()) {
+// options.put(AJAX_ABORT_ATTR, JSReference.TRUE);
+// if (null == queue) {
+// implicitQueue = clientId;
+// }
+// }
+//
+// if (null != queue) {
+// options.put(AJAX_QUEUE_ATTR, queue);
+// } else if (implicitQueue != null) {
+// options.put("implicitEventsQueue", clientId);
+// }
+//
+// ExternalContext externalContext = facesContext.getExternalContext();
+// String namespace = externalContext.encodeNamespace("");
+// if (namespace != null && namespace.length() != 0) {
+// options.put("namespace", namespace);
+// }
+//
+// String similarityGroupingId = (String)
componentAttributes.get(SIMILARITY_GROUPING_ID_ATTR);
+// if (similarityGroupingId == null || similarityGroupingId.length() == 0) {
+// similarityGroupingId = clientId;
+// } else {
+// similarityGroupingId = externalContext.encodeNamespace(similarityGroupingId);
+// }
+//
+// options.put(SIMILARITY_GROUPING_ID_ATTR, similarityGroupingId);
+//
+// // request timeout.
+// Integer timeout = (Integer) componentAttributes.get("timeout");
+// if (null != timeout && timeout.intValue() > 0) {
+// options.put("timeout", timeout);
+// }
+// // Encoding for requests
+// String encoding = (String) componentAttributes.get("encoding");
+// if (null != encoding) {
+// options.put("encoding", encoding);
+// }
+// return options;
+// }
- if (null != queue) {
- options.put(AJAX_QUEUE_ATTR, queue);
- } else if (implicitQueue != null) {
- options.put("implicitEventsQueue", clientId);
- }
-
- ExternalContext externalContext = facesContext.getExternalContext();
- String namespace = externalContext.encodeNamespace("");
- if (namespace != null && namespace.length() != 0) {
- options.put("namespace", namespace);
- }
-
- String similarityGroupingId = (String)
componentAttributes.get(SIMILARITY_GROUPING_ID_ATTR);
- if (similarityGroupingId == null || similarityGroupingId.length() == 0) {
- similarityGroupingId = clientId;
- } else {
- similarityGroupingId = externalContext.encodeNamespace(similarityGroupingId);
- }
-
- options.put(SIMILARITY_GROUPING_ID_ATTR, similarityGroupingId);
-
- // request timeout.
- Integer timeout = (Integer) componentAttributes.get("timeout");
- if (null != timeout && timeout.intValue() > 0) {
- options.put("timeout", timeout);
- }
- // Encoding for requests
- String encoding = (String) componentAttributes.get("encoding");
- if (null != encoding) {
- options.put("encoding", encoding);
- }
- return options;
- }
-
// /**
// * Create call to Ajax Submit function with first two parameters
// *
@@ -1111,7 +1109,7 @@
}
}
- if (!hasSubmittingBehavior || (parametersMap != null &&
!parametersMap.isEmpty())) {
+ if (!hasSubmittingBehavior) {
JSFunction jsFunction = new JSFunction(AJAX_FUNCTION_NAME, JSReference.THIS,
JSReference.EVENT);
if (parametersMap != null && !parametersMap.isEmpty()) {
jsFunction.addParameter(parametersMap);
Modified:
root/framework/trunk/impl/src/main/java/org/richfaces/context/PartialViewContextFactoryImpl.java
===================================================================
---
root/framework/trunk/impl/src/main/java/org/richfaces/context/PartialViewContextFactoryImpl.java 2009-08-20
16:40:21 UTC (rev 15241)
+++
root/framework/trunk/impl/src/main/java/org/richfaces/context/PartialViewContextFactoryImpl.java 2009-08-20
16:52:34 UTC (rev 15242)
@@ -31,6 +31,8 @@
*/
public class PartialViewContextFactoryImpl extends PartialViewContextFactory {
+ public static final String RICHFACES_AJAX = "RICHFACES_AJAX";
+
private PartialViewContextFactory parentFactory;
public PartialViewContextFactoryImpl(PartialViewContextFactory parentFactory) {
@@ -42,7 +44,7 @@
public PartialViewContext getPartialViewContext(final FacesContext context) {
PartialViewContext partialViewContext = parentFactory.getPartialViewContext(context);
- String clientId =
context.getExternalContext().getRequestParameterMap().get("RICHFACES_AJAX");
+ String clientId =
context.getExternalContext().getRequestParameterMap().get(RICHFACES_AJAX);
if (clientId != null) {
partialViewContext = new PartialViewContextImpl(partialViewContext, clientId);
}
Modified:
root/framework/trunk/impl/src/main/resources/META-INF/resources/richfaces.js/4_0_0.js
===================================================================
---
root/framework/trunk/impl/src/main/resources/META-INF/resources/richfaces.js/4_0_0.js 2009-08-20
16:40:21 UTC (rev 15241)
+++
root/framework/trunk/impl/src/main/resources/META-INF/resources/richfaces.js/4_0_0.js 2009-08-20
16:52:34 UTC (rev 15242)
@@ -269,12 +269,17 @@
options = options || {};
var sourceId = (typeof source == 'object' && source.id) ? source.id :
source;
- options.execute = "@component";
- options.render = "@component";
- options.RICHFACES_AJAX = sourceId;
- options[sourceId] = sourceId;
+ parameters = options.parameters || {};
+ parameters.execute = "@component";
+ parameters.render = "@component";
- jsf.ajax.request(source, event, options);
+ if (!parameters.RICHFACES_AJAX) {
+ parameters.RICHFACES_AJAX = sourceId;
+ }
+
+ parameters[sourceId] = sourceId;
+
+ jsf.ajax.request(source, event, parameters);
};
var RICHFACES_AJAX_STATUS = "richfaces:ajaxStatus";
Modified:
root/ui/trunk/components/core/src/main/java/org/ajax4jsf/renderkit/AjaxBeahaviorRenderer.java
===================================================================
---
root/ui/trunk/components/core/src/main/java/org/ajax4jsf/renderkit/AjaxBeahaviorRenderer.java 2009-08-20
16:40:21 UTC (rev 15241)
+++
root/ui/trunk/components/core/src/main/java/org/ajax4jsf/renderkit/AjaxBeahaviorRenderer.java 2009-08-20
16:52:34 UTC (rev 15242)
@@ -1,7 +1,5 @@
package org.ajax4jsf.renderkit;
-import java.util.Map;
-
import javax.faces.application.ResourceDependencies;
import javax.faces.application.ResourceDependency;
import javax.faces.component.ActionSource;
@@ -85,21 +83,21 @@
UIComponent parent = bContext.getComponent();
FacesContext context = bContext.getFacesContext();
- JSFunction ajaxFunction = AjaxRendererUtils.buildAjaxFunction(parent, context,
"RichFaces.ajax");
+ JSFunction ajaxFunction = AjaxRendererUtils.buildAjaxFunction(parent, context,
AjaxRendererUtils.AJAX_FUNCTION_NAME);
- Map<String, Object> options = buildOptions(context, bContext);
+ AjaxEventOptions options = buildOptions(context, bContext);
ajaxFunction.addParameter(options);
return ajaxFunction.toString();
}
- public Map<String, Object> buildOptions(FacesContext context,
ClientBehaviorContext bContext) {
+ public AjaxEventOptions buildOptions(FacesContext context, ClientBehaviorContext
bContext) {
UIComponent parent = bContext.getComponent();
String eventName = bContext.getEventName();
- Map<String,Object> options = AjaxRendererUtils.buildEventOptions(context,
parent);
- options.put(PartialViewContextImpl.BEHAVIOR_EVENT_PARAMETER, eventName);
- options.put(PartialViewContextFactoryImpl.RICHFACES_AJAX, parent.getClientId());
+ AjaxEventOptions options = AjaxRendererUtils.buildEventOptions(context, parent);
+ options.setParameter(PartialViewContextImpl.BEHAVIOR_EVENT_PARAMETER, eventName);
+ options.setParameter(PartialViewContextFactoryImpl.RICHFACES_AJAX,
parent.getClientId());
return options;
}
}
Modified:
root/ui/trunk/components/core/src/main/java/org/richfaces/renderkit/AjaxFunctionRendererBase.java
===================================================================
---
root/ui/trunk/components/core/src/main/java/org/richfaces/renderkit/AjaxFunctionRendererBase.java 2009-08-20
16:40:21 UTC (rev 15241)
+++
root/ui/trunk/components/core/src/main/java/org/richfaces/renderkit/AjaxFunctionRendererBase.java 2009-08-20
16:52:34 UTC (rev 15242)
@@ -36,6 +36,7 @@
import org.ajax4jsf.javascript.JSFunctionDefinition;
import org.ajax4jsf.javascript.JSReference;
import org.ajax4jsf.javascript.ScriptUtils;
+import org.ajax4jsf.renderkit.AjaxEventOptions;
import org.ajax4jsf.renderkit.AjaxRendererUtils;
import org.richfaces.component.UIAjaxFunction;
@@ -71,10 +72,10 @@
// Create AJAX Submit function.
JSFunction ajaxFunction = AjaxRendererUtils.buildAjaxFunction(
component, context, AjaxRendererUtils.AJAX_FUNCTION_NAME);
- Map<String, Object> options = AjaxRendererUtils.buildEventOptions(context,
component);
+ AjaxEventOptions options = AjaxRendererUtils.buildEventOptions(context, component);
ajaxFunction.addParameter(options);
- Map<String, Object> parameters = options;
+ Map<String, Object> parameters = options.getParameters();
// if (null == parameters) {
// parameters = new HashMap<String, Object>();
// options.put("parameters", parameters);