Author: nbelaevski
Date: 2009-06-21 09:57:33 -0400 (Sun, 21 Jun 2009)
New Revision: 14685
Modified:
branches/community/3.3.X/ui/beanValidator/src/main/java/org/richfaces/component/UIAjaxValidator.java
branches/community/3.3.X/ui/calendar/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java
branches/community/3.3.X/ui/core/src/main/java/org/ajax4jsf/component/UIAjaxSupport.java
branches/community/3.3.X/ui/core/src/main/java/org/ajax4jsf/renderkit/AjaxCommandRendererBase.java
branches/community/3.3.X/ui/core/src/main/java/org/ajax4jsf/renderkit/AjaxFunctionRendererBase.java
branches/community/3.3.X/ui/core/src/main/java/org/ajax4jsf/renderkit/html/AjaxFormRenderer.java
branches/community/3.3.X/ui/core/src/main/java/org/ajax4jsf/renderkit/html/AjaxPollRenderer.java
branches/community/3.3.X/ui/core/src/main/java/org/ajax4jsf/renderkit/html/AjaxPushRenderer.java
branches/community/3.3.X/ui/core/src/test/java/org/ajax4jsf/component/AbstractQueueComponentTest.java
branches/community/3.3.X/ui/dataFilterSlider/src/main/java/org/richfaces/renderkit/DataFilterSliderRendererBase.java
branches/community/3.3.X/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java
branches/community/3.3.X/ui/datascroller/src/main/java/org/richfaces/renderkit/html/DataScrollerRenderer.java
branches/community/3.3.X/ui/drag-drop/src/main/java/org/richfaces/renderkit/DraggableRendererContributor.java
branches/community/3.3.X/ui/drag-drop/src/main/java/org/richfaces/renderkit/DropzoneRendererContributor.java
branches/community/3.3.X/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedTableRenderer.java
branches/community/3.3.X/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/ExtDropzoneRendererContributor.java
branches/community/3.3.X/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/SimpleTableMenuRenderer.java
branches/community/3.3.X/ui/fileUpload/src/main/java/org/richfaces/renderkit/FileUploadRendererBase.java
branches/community/3.3.X/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js
branches/community/3.3.X/ui/fileUpload/src/main/templates/org/richfaces/fileUpload.jspx
branches/community/3.3.X/ui/layout/
branches/community/3.3.X/ui/menu-components/src/main/java/org/richfaces/renderkit/html/MenuItemRendererBase.java
branches/community/3.3.X/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuRenderer.java
branches/community/3.3.X/ui/progressBAR/src/main/java/org/richfaces/renderkit/AbstractProgressBarRenderer.java
branches/community/3.3.X/ui/progressBAR/src/main/resources/org/richfaces/renderkit/html/js/progressBar.js
branches/community/3.3.X/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/ScrollableDataTableBaseRenderer.java
branches/community/3.3.X/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/ScrollableDataTableOptions.java
branches/community/3.3.X/ui/simpleTogglePanel/src/main/java/org/richfaces/renderkit/html/SimpleTogglePanelRenderer.java
branches/community/3.3.X/ui/suggestionbox/src/main/java/org/richfaces/renderkit/html/SuggestionBoxRenderer.java
branches/community/3.3.X/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js
branches/community/3.3.X/ui/tabPanel/src/main/java/org/richfaces/renderkit/TabHeaderRendererBase.java
branches/community/3.3.X/ui/togglePanel/src/main/java/org/richfaces/renderkit/html/ToggleControlRenderer.java
branches/community/3.3.X/ui/tooltip/src/main/java/org/richfaces/renderkit/html/ToolTipRenderer.java
branches/community/3.3.X/ui/tree/src/main/java/org/richfaces/renderkit/NodeRendererBase.java
branches/community/3.3.X/ui/tree/src/main/java/org/richfaces/renderkit/TreeRendererBase.java
Log:
https://jira.jboss.org/jira/browse/RF-7375
Modified:
branches/community/3.3.X/ui/beanValidator/src/main/java/org/richfaces/component/UIAjaxValidator.java
===================================================================
---
branches/community/3.3.X/ui/beanValidator/src/main/java/org/richfaces/component/UIAjaxValidator.java 2009-06-21
13:51:28 UTC (rev 14684)
+++
branches/community/3.3.X/ui/beanValidator/src/main/java/org/richfaces/component/UIAjaxValidator.java 2009-06-21
13:57:33 UTC (rev 14685)
@@ -133,7 +133,7 @@
buildOnEvent.append(onsubmit).append(";");
}
buildOnEvent.append(AjaxRendererUtils.buildOnEvent(this,
- getFacesContext(), getEvent()));
+ getFacesContext(), getEvent(), true));
String script = buildOnEvent.toString();
return script;
}
Modified:
branches/community/3.3.X/ui/calendar/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java
===================================================================
---
branches/community/3.3.X/ui/calendar/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java 2009-06-21
13:51:28 UTC (rev 14684)
+++
branches/community/3.3.X/ui/calendar/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java 2009-06-21
13:57:33 UTC (rev 14685)
@@ -460,7 +460,7 @@
HashMap<String, Object> params = new HashMap<String, Object>();
params.put(calendar.getClientId(context) + CURRENT_DATE_PRELOAD, Boolean.TRUE);
- Map<String, Object> options = AjaxRendererUtils.buildEventOptions(context,
calendar, params);
+ Map<String, Object> options = AjaxRendererUtils.buildEventOptions(context,
calendar, params, true);
options.put("calendar", JSReference.THIS);
String oncomplete = AjaxRendererUtils.getAjaxOncomplete(calendar);
Modified:
branches/community/3.3.X/ui/core/src/main/java/org/ajax4jsf/component/UIAjaxSupport.java
===================================================================
---
branches/community/3.3.X/ui/core/src/main/java/org/ajax4jsf/component/UIAjaxSupport.java 2009-06-21
13:51:28 UTC (rev 14684)
+++
branches/community/3.3.X/ui/core/src/main/java/org/ajax4jsf/component/UIAjaxSupport.java 2009-06-21
13:57:33 UTC (rev 14685)
@@ -95,7 +95,7 @@
buildOnEvent.append(onsubmit).append(";");
}
buildOnEvent.append(AjaxRendererUtils.buildOnEvent(this,
- getFacesContext(), getEvent()));
+ getFacesContext(), getEvent(), true));
String script = buildOnEvent.toString();
return script;
}
Modified:
branches/community/3.3.X/ui/core/src/main/java/org/ajax4jsf/renderkit/AjaxCommandRendererBase.java
===================================================================
---
branches/community/3.3.X/ui/core/src/main/java/org/ajax4jsf/renderkit/AjaxCommandRendererBase.java 2009-06-21
13:51:28 UTC (rev 14684)
+++
branches/community/3.3.X/ui/core/src/main/java/org/ajax4jsf/renderkit/AjaxCommandRendererBase.java 2009-06-21
13:57:33 UTC (rev 14685)
@@ -80,7 +80,7 @@
public String getOnClick(FacesContext context, UIComponent component) {
StringBuffer onClick;
if (!getUtils().isBooleanAttribute(component, "disabled")) {
- onClick = AjaxRendererUtils.buildOnClick(component, context);
+ onClick = AjaxRendererUtils.buildOnClick(component, context, true);
if (!"reset".equals(component.getAttributes().get("type"))) {
onClick.append(";return false;");
}
Modified:
branches/community/3.3.X/ui/core/src/main/java/org/ajax4jsf/renderkit/AjaxFunctionRendererBase.java
===================================================================
---
branches/community/3.3.X/ui/core/src/main/java/org/ajax4jsf/renderkit/AjaxFunctionRendererBase.java 2009-06-21
13:51:28 UTC (rev 14684)
+++
branches/community/3.3.X/ui/core/src/main/java/org/ajax4jsf/renderkit/AjaxFunctionRendererBase.java 2009-06-21
13:57:33 UTC (rev 14685)
@@ -63,7 +63,7 @@
// Create AJAX Submit function.
JSFunction ajaxFunction = AjaxRendererUtils.buildAjaxFunction(
component, context,AjaxRendererUtils.AJAX_FUNCTION_NAME);
- Map<String, Object> options = AjaxRendererUtils.buildEventOptions(context,
component);
+ Map<String, Object> options = AjaxRendererUtils.buildEventOptions(context,
component, true);
Map<String, Object> parameters = (Map<String, Object>)
options.get("parameters");
if (null == parameters) {
parameters = new HashMap<String, Object>();
Modified:
branches/community/3.3.X/ui/core/src/main/java/org/ajax4jsf/renderkit/html/AjaxFormRenderer.java
===================================================================
---
branches/community/3.3.X/ui/core/src/main/java/org/ajax4jsf/renderkit/html/AjaxFormRenderer.java 2009-06-21
13:51:28 UTC (rev 14684)
+++
branches/community/3.3.X/ui/core/src/main/java/org/ajax4jsf/renderkit/html/AjaxFormRenderer.java 2009-06-21
13:57:33 UTC (rev 14685)
@@ -132,7 +132,7 @@
component, context,
AJAX_FORM_FUNCTION_NAME);
ajaxFunction.addParameter(AjaxRendererUtils.buildEventOptions(
- context, component));
+ context, component, false));
ajaxFunction.appendScript(onSubmit);
writer.writeURIAttribute("action", onSubmit, "action");
} else {
Modified:
branches/community/3.3.X/ui/core/src/main/java/org/ajax4jsf/renderkit/html/AjaxPollRenderer.java
===================================================================
---
branches/community/3.3.X/ui/core/src/main/java/org/ajax4jsf/renderkit/html/AjaxPollRenderer.java 2009-06-21
13:51:28 UTC (rev 14684)
+++
branches/community/3.3.X/ui/core/src/main/java/org/ajax4jsf/renderkit/html/AjaxPollRenderer.java 2009-06-21
13:57:33 UTC (rev 14685)
@@ -59,7 +59,7 @@
StringBuffer script = new StringBuffer("\n");
if(poll.isEnabled()){
JSFunction function = AjaxRendererUtils.buildAjaxFunction(component, context,
AJAX_POLL_FUNCTION);
- Map options = AjaxRendererUtils.buildEventOptions(context, component);
+ Map options = AjaxRendererUtils.buildEventOptions(context, component, true);
Integer interval = new Integer(poll.getInterval());
options.put("pollinterval", interval);
options.put("pollId", component.getClientId(context));
Modified:
branches/community/3.3.X/ui/core/src/main/java/org/ajax4jsf/renderkit/html/AjaxPushRenderer.java
===================================================================
---
branches/community/3.3.X/ui/core/src/main/java/org/ajax4jsf/renderkit/html/AjaxPushRenderer.java 2009-06-21
13:51:28 UTC (rev 14684)
+++
branches/community/3.3.X/ui/core/src/main/java/org/ajax4jsf/renderkit/html/AjaxPushRenderer.java 2009-06-21
13:57:33 UTC (rev 14685)
@@ -69,7 +69,7 @@
if(push.isEnabled()){
JSFunction function = AjaxRendererUtils.buildAjaxFunction(component, context,
AJAX_PUSH_FUNCTION);
// Set dummy form id, if nessesary.
- Map<String, Object> options = AjaxRendererUtils.buildEventOptions(context,
component);
+ Map<String, Object> options = AjaxRendererUtils.buildEventOptions(context,
component, false);
options.put("dummyForm",
component.getClientId(context)+RendererUtils.DUMMY_FORM_ID);
int interval = push.getInterval();
if(interval == Integer.MIN_VALUE){
Modified:
branches/community/3.3.X/ui/core/src/test/java/org/ajax4jsf/component/AbstractQueueComponentTest.java
===================================================================
---
branches/community/3.3.X/ui/core/src/test/java/org/ajax4jsf/component/AbstractQueueComponentTest.java 2009-06-21
13:51:28 UTC (rev 14684)
+++
branches/community/3.3.X/ui/core/src/test/java/org/ajax4jsf/component/AbstractQueueComponentTest.java 2009-06-21
13:57:33 UTC (rev 14685)
@@ -103,7 +103,7 @@
public void encodeToHead(FacesContext facesContext, UIComponent component)
throws IOException {
JSFunction ajaxFunction = AjaxRendererUtils.buildAjaxFunction(component,
facesContext);
- Map<String, Object> options = AjaxRendererUtils.buildEventOptions(facesContext,
component);
+ Map<String, Object> options = AjaxRendererUtils.buildEventOptions(facesContext,
component, true);
options.put("requestDelay", new
JSReference("options.requestDelay"));
options.put("similarityGroupingId", new
JSReference("options.similarityGroupingId || '" +
component.getClientId(facesContext) + "'"));
Modified:
branches/community/3.3.X/ui/dataFilterSlider/src/main/java/org/richfaces/renderkit/DataFilterSliderRendererBase.java
===================================================================
---
branches/community/3.3.X/ui/dataFilterSlider/src/main/java/org/richfaces/renderkit/DataFilterSliderRendererBase.java 2009-06-21
13:51:28 UTC (rev 14684)
+++
branches/community/3.3.X/ui/dataFilterSlider/src/main/java/org/richfaces/renderkit/DataFilterSliderRendererBase.java 2009-06-21
13:57:33 UTC (rev 14685)
@@ -128,7 +128,7 @@
JSFunction ajaxFunction = AjaxRendererUtils.buildAjaxFunction(slider,context);
ajaxFunction.addParameter(AjaxRendererUtils.buildEventOptions(
- context, slider));
+ context, slider, true));
StringBuffer script= new StringBuffer();
ajaxFunction.appendScript(script);
script.append("; return false");
Modified:
branches/community/3.3.X/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java
===================================================================
---
branches/community/3.3.X/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java 2009-06-21
13:51:28 UTC (rev 14684)
+++
branches/community/3.3.X/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java 2009-06-21
13:57:33 UTC (rev 14685)
@@ -656,7 +656,7 @@
setRequiresScripts(context);
JSFunction ajaxFunction = AjaxRendererUtils.buildAjaxFunction(table, context);
- Map<String, Object> eventOptions = AjaxRendererUtils.buildEventOptions(context,
table);
+ Map<String, Object> eventOptions = AjaxRendererUtils.buildEventOptions(context,
table, true);
@SuppressWarnings("unchecked")
Modified:
branches/community/3.3.X/ui/datascroller/src/main/java/org/richfaces/renderkit/html/DataScrollerRenderer.java
===================================================================
---
branches/community/3.3.X/ui/datascroller/src/main/java/org/richfaces/renderkit/html/DataScrollerRenderer.java 2009-06-21
13:51:28 UTC (rev 14684)
+++
branches/community/3.3.X/ui/datascroller/src/main/java/org/richfaces/renderkit/html/DataScrollerRenderer.java 2009-06-21
13:57:33 UTC (rev 14685)
@@ -283,7 +283,7 @@
JSFunction function = AjaxRendererUtils.buildAjaxFunction(component,
context);
Map eventOptions = AjaxRendererUtils.buildEventOptions(context,
- component);
+ component, true);
Map parameters = (Map) eventOptions.get("parameters");
Map params = getParameters(context,component);
Modified:
branches/community/3.3.X/ui/drag-drop/src/main/java/org/richfaces/renderkit/DraggableRendererContributor.java
===================================================================
---
branches/community/3.3.X/ui/drag-drop/src/main/java/org/richfaces/renderkit/DraggableRendererContributor.java 2009-06-21
13:51:28 UTC (rev 14684)
+++
branches/community/3.3.X/ui/drag-drop/src/main/java/org/richfaces/renderkit/DraggableRendererContributor.java 2009-06-21
13:57:33 UTC (rev 14685)
@@ -109,7 +109,7 @@
DraggableOptions options = new DraggableOptions(draggable);
Map eventOptions = AjaxRendererUtils.buildEventOptions(context, component,
- Collections.singletonMap(DRAG_SOURCE_ID, (Object) component.getClientId(context)));
+ Collections.singletonMap(DRAG_SOURCE_ID, (Object) component.getClientId(context)),
true);
Map parameters = (Map) eventOptions.get("parameters");
if (parameters == null) {
Modified:
branches/community/3.3.X/ui/drag-drop/src/main/java/org/richfaces/renderkit/DropzoneRendererContributor.java
===================================================================
---
branches/community/3.3.X/ui/drag-drop/src/main/java/org/richfaces/renderkit/DropzoneRendererContributor.java 2009-06-21
13:51:28 UTC (rev 14684)
+++
branches/community/3.3.X/ui/drag-drop/src/main/java/org/richfaces/renderkit/DropzoneRendererContributor.java 2009-06-21
13:57:33 UTC (rev 14685)
@@ -278,7 +278,7 @@
definition.addParameter("event");
definition.addParameter("drag");
- Map requestOpts = AjaxRendererUtils.buildEventOptions(context, component);
+ Map requestOpts = AjaxRendererUtils.buildEventOptions(context, component, true);
definition.addToBody("var options =
").addToBody(ScriptUtils.toScript(requestOpts)).addToBody(";");
definition.addToBody("options.parameters['" + DROP_TARGET_ID +
"'] = '" + component.getClientId(context) + "';");
//TODO nick - remove as legacy
Modified:
branches/community/3.3.X/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedTableRenderer.java
===================================================================
---
branches/community/3.3.X/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedTableRenderer.java 2009-06-21
13:51:28 UTC (rev 14684)
+++
branches/community/3.3.X/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedTableRenderer.java 2009-06-21
13:57:33 UTC (rev 14685)
@@ -920,7 +920,7 @@
definition.addParameter("ascending");
String id = table.getClientId(context);
Map<String, Object> eventOptions = AjaxRendererUtils.buildEventOptions(
- context, table);
+ context, table, true);
@SuppressWarnings("unchecked")
Map<String, Object> parameters = (Map<String, Object>) eventOptions
.get("parameters");
@@ -955,7 +955,7 @@
protected JSFunction getSortFunction(FacesContext context, UIDataTable table) {
String id = table.getClientId(context);
Map<String, Object> requestOpts = AjaxRendererUtils.buildEventOptions(
- context, table);
+ context, table, true);
@SuppressWarnings("unchecked")
Map<String, Object> parameters = (Map<String, Object>) requestOpts
.get("parameters");
@@ -978,7 +978,7 @@
UIDataTable table) {
String id = table.getClientId(context);
Map<String, Object> requestOpts = AjaxRendererUtils.buildEventOptions(
- context, table);
+ context, table, true);
@SuppressWarnings("unchecked")
Map<String, Object> parameters = (Map<String, Object>) requestOpts
.get("parameters");
@@ -1003,7 +1003,7 @@
definition.addParameter("columnId");
String id = table.getClientId(context);
Map<String, Object> eventOptions = AjaxRendererUtils.buildEventOptions(
- context, table);
+ context, table, true);
@SuppressWarnings("unchecked")
Map<String, Object> parameters = (Map<String, Object>) eventOptions
.get("parameters");
@@ -1032,7 +1032,7 @@
definition.addParameter("event");
definition.addParameter("groupIndex");
Map<String, Object> eventOptions = AjaxRendererUtils.buildEventOptions(
- context, table);
+ context, table, true);
@SuppressWarnings("unchecked")
Map<String, Object> parameters = (Map<String, Object>) eventOptions
.get("parameters");
@@ -1055,7 +1055,7 @@
definition.addParameter("columnWidths");
Map<String, Object> eventOptions = AjaxRendererUtils.buildEventOptions(
- context, table);
+ context, table, true);
@SuppressWarnings("unchecked")
Map<String, Object> parameters = (Map<String, Object>) eventOptions
.get("parameters");
@@ -1076,7 +1076,7 @@
FacesContext context, UIDataTable table) {
boolean ajaxSingle = true;
Map<String, Object> requestOpts = AjaxRendererUtils.buildEventOptions(
- context, table);
+ context, table, true);
JSFunctionDefinition onAjaxCompleteFunction = getOnAjaxCompleteFunction(
context, table);
@@ -1426,7 +1426,7 @@
JSFunction ajaxFunction = AjaxRendererUtils.buildAjaxFunction(table,
context);
Map<String, Object> eventOptions = AjaxRendererUtils.buildEventOptions(
- context, table);
+ context, table, true);
@SuppressWarnings("unchecked")
Map<String, Object> parameters = (Map<String, Object>) eventOptions
.get("parameters");
Modified:
branches/community/3.3.X/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/ExtDropzoneRendererContributor.java
===================================================================
---
branches/community/3.3.X/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/ExtDropzoneRendererContributor.java 2009-06-21
13:51:28 UTC (rev 14684)
+++
branches/community/3.3.X/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/ExtDropzoneRendererContributor.java 2009-06-21
13:57:33 UTC (rev 14685)
@@ -95,7 +95,7 @@
definition.addParameter("event");
definition.addParameter("drag");
- Map<String, Object> requestOpts = AjaxRendererUtils.buildEventOptions(context,
column);
+ Map<String, Object> requestOpts = AjaxRendererUtils.buildEventOptions(context,
column, true);
//replace parameters
String clientId = column.getClientId(context);
@SuppressWarnings("unchecked")
Modified:
branches/community/3.3.X/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/SimpleTableMenuRenderer.java
===================================================================
---
branches/community/3.3.X/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/SimpleTableMenuRenderer.java 2009-06-21
13:51:28 UTC (rev 14684)
+++
branches/community/3.3.X/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/SimpleTableMenuRenderer.java 2009-06-21
13:57:33 UTC (rev 14685)
@@ -90,7 +90,7 @@
if ((!columnVisible) || (visibleColumnsCount > 1)) {
boolean ajaxSingle = true;
Map<String, Object> requestOpts = AjaxRendererUtils
- .buildEventOptions(context, dataColumn);
+ .buildEventOptions(context, dataColumn, true);
if (onAjaxCompleteFunction != null)
requestOpts.put(AjaxRendererUtils.ONCOMPLETE_ATTR_NAME,
Modified:
branches/community/3.3.X/ui/fileUpload/src/main/java/org/richfaces/renderkit/FileUploadRendererBase.java
===================================================================
---
branches/community/3.3.X/ui/fileUpload/src/main/java/org/richfaces/renderkit/FileUploadRendererBase.java 2009-06-21
13:51:28 UTC (rev 14684)
+++
branches/community/3.3.X/ui/fileUpload/src/main/java/org/richfaces/renderkit/FileUploadRendererBase.java 2009-06-21
13:57:33 UTC (rev 14685)
@@ -54,8 +54,6 @@
import org.ajax4jsf.javascript.JSReference;
import org.ajax4jsf.javascript.ScriptUtils;
import org.ajax4jsf.renderkit.AjaxRendererUtils;
-import org.ajax4jsf.renderkit.ComponentVariables;
-import org.ajax4jsf.renderkit.ComponentsVariableResolver;
import org.ajax4jsf.renderkit.RendererUtils;
import org.ajax4jsf.request.MultipartRequest;
import org.ajax4jsf.resource.CountingOutputWriter;
@@ -209,24 +207,6 @@
}
/**
- * Gets container id
- *
- * @param context -
- * faces context
- * @param component -
- * component
- * @return String container id
- */
- public String getContainerId(FacesContext context, UIComponent component) {
- UIComponent container = (UIComponent) AjaxRendererUtils
- .findAjaxContainer(context, component);
- if (container != null) {
- return container.getClientId(context);
- }
- return null;
- }
-
- /**
* Generates map with internalized labels to be put into JS
*
* @param o
@@ -437,31 +417,21 @@
@SuppressWarnings("unchecked")
private String getActionScript(FacesContext context, UIComponent component,
String action, Object oncomplete) throws IOException {
- ComponentVariables variables = ComponentsVariableResolver.getVariables(
- this, component);
String clientId = component.getClientId(context);
- String containerId = (String) variables.getVariable("containerId");
- JSFunction ajaxFunction = new JSFunction(
- AjaxRendererUtils.AJAX_FUNCTION_NAME);
- ajaxFunction.addParameter(containerId);
- ajaxFunction.addParameter(new JSReference("formId"));
- ajaxFunction.addParameter(new JSReference("event"));
- // AjaxRendererUtils.buildAjaxFunction(
- // component, context);
+ JSFunction ajaxFunction = AjaxRendererUtils.buildAjaxFunction(component, context);
- Map options = AjaxRendererUtils.buildEventOptions(context, component);
- Map parameters = (Map) options.get("parameters");
+ Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put(FileUploadConstants.FILE_UPLOAD_ACTION, action);
parameters.put(FileUploadConstants.UPLOAD_FILES_ID, new JSReference("uid"));
- parameters.put(clientId, clientId);
parameters.put(AjaxRendererUtils.AJAX_SINGLE_ATTR, clientId);
+
+ Map options = AjaxRendererUtils.buildEventOptions(context, component, parameters,
true);
if (oncomplete != null) {
options.put("onbeforedomupdate", oncomplete);
}
ajaxFunction.addParameter(options);
JSFunctionDefinition function = new JSFunctionDefinition("uid");
- function.addParameter("formId");
function.addParameter("event");
function.addToBody(ajaxFunction.toScript());
Modified:
branches/community/3.3.X/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js
===================================================================
---
branches/community/3.3.X/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js 2009-06-21
13:51:28 UTC (rev 14684)
+++
branches/community/3.3.X/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js 2009-06-21
13:57:33 UTC (rev 14685)
@@ -184,7 +184,7 @@
},
stop: function() {
- this.uploadObject.stopScript(this.uid, this.uploadObject.formId);
+ this.uploadObject.stopScript(this.uid);
},
_clearInput: function() {
@@ -659,7 +659,7 @@
if (this.activeEntry) {
this._fileSizeScriptTimeoutId = setTimeout(function() {
this._fileSizeScriptTimeoutId = undefined;
- this.getFileSizeScript(this.activeEntry.uid, this.formId);
+ this.getFileSizeScript(this.activeEntry.uid);
}.bind(this), this.progressBar.options['pollinterval'] || 500);
}
}
@@ -1123,7 +1123,7 @@
Richfaces.writeAttribute(parentForm, "enctype",
"multipart/form-data");
Richfaces.writeAttribute(parentForm, "action",
- this.actionUrl + (/\?/.test(this.actionUrl) ? '&_richfaces_upload_uid'
: '?_richfaces_upload_uid') + '=' + encodeURI(entry.uid) +
"&" + this.id + "=" + this.id +
"&_richfaces_upload_file_indicator=true"+"&AJAXREQUEST="+this.progressBar.containerId);
+ this.actionUrl + (/\?/.test(this.actionUrl) ? '&_richfaces_upload_uid'
: '?_richfaces_upload_uid') + '=' + encodeURI(entry.uid) +
"&" + this.id + "=" + this.id +
"&_richfaces_upload_file_indicator=true"+"&AJAXREQUEST=" +
(this.progressBar.options.containerId || A4J.AJAX.VIEW_ROOT_ID));
Richfaces.writeAttribute(parentForm, "target", this.id +
"_iframe");
@@ -1184,7 +1184,7 @@
this.currentInput.disabled = true;
}else {
Richfaces.writeAttribute(parentForm, "target", oldTarget);
- this.getFileSizeScript(entry.uid, this.formId)
+ this.getFileSizeScript(entry.uid)
}
}
},
@@ -1336,7 +1336,7 @@
},
_flashGetPostParams: function () {
- var query = new A4J.Query(this.progressBar.containerId, this.form);
+ var query = new A4J.Query(this.progressBar.options.containerId, this.form);
if (query) {
query.appendFormControls();
var qStr = query.getQueryString();
Modified:
branches/community/3.3.X/ui/fileUpload/src/main/templates/org/richfaces/fileUpload.jspx
===================================================================
---
branches/community/3.3.X/ui/fileUpload/src/main/templates/org/richfaces/fileUpload.jspx 2009-06-21
13:51:28 UTC (rev 14684)
+++
branches/community/3.3.X/ui/fileUpload/src/main/templates/org/richfaces/fileUpload.jspx 2009-06-21
13:57:33 UTC (rev 14685)
@@ -53,8 +53,6 @@
String ajaxActionUrl = ajaxContext.getAjaxActionURL(context);
variables.setVariable("actionUrl", ajaxActionUrl);
- variables.setVariable("formId",getFormId(context, component));
- variables.setVariable("containerId",getContainerId(context, component));
variables.setVariable("listWidth", getFileListWidth(component));
variables.setVariable("listHeight", getFileListHeight(component));
Property changes on: branches/community/3.3.X/ui/layout
___________________________________________________________________
Name: svn:ignore
+ target
Modified:
branches/community/3.3.X/ui/menu-components/src/main/java/org/richfaces/renderkit/html/MenuItemRendererBase.java
===================================================================
---
branches/community/3.3.X/ui/menu-components/src/main/java/org/richfaces/renderkit/html/MenuItemRendererBase.java 2009-06-21
13:51:28 UTC (rev 14684)
+++
branches/community/3.3.X/ui/menu-components/src/main/java/org/richfaces/renderkit/html/MenuItemRendererBase.java 2009-06-21
13:57:33 UTC (rev 14685)
@@ -229,7 +229,7 @@
}
}
scriptValue.append(AjaxRendererUtils.buildOnEvent(
- menuItem, context, event).toString());
+ menuItem, context, event, true).toString());
menuItemAttributes.put(HTML.onselect_ATTRIBUTE, null);
} else if (MenuComponent.MODE_SERVER.equalsIgnoreCase(mode)) {
Modified:
branches/community/3.3.X/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuRenderer.java
===================================================================
---
branches/community/3.3.X/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuRenderer.java 2009-06-21
13:51:28 UTC (rev 14684)
+++
branches/community/3.3.X/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuRenderer.java 2009-06-21
13:57:33 UTC (rev 14685)
@@ -501,7 +501,7 @@
JSFunction function = AjaxRendererUtils.buildAjaxFunction(child,
context);
Map eventOptions = AjaxRendererUtils.buildEventOptions(context,
- child);
+ child, true);
function.addParameter(eventOptions);
buffer.append(",\"");
Modified:
branches/community/3.3.X/ui/progressBAR/src/main/java/org/richfaces/renderkit/AbstractProgressBarRenderer.java
===================================================================
---
branches/community/3.3.X/ui/progressBAR/src/main/java/org/richfaces/renderkit/AbstractProgressBarRenderer.java 2009-06-21
13:51:28 UTC (rev 14684)
+++
branches/community/3.3.X/ui/progressBAR/src/main/java/org/richfaces/renderkit/AbstractProgressBarRenderer.java 2009-06-21
13:57:33 UTC (rev 14685)
@@ -265,8 +265,6 @@
RendererUtils utils = getUtils();
String clientId = component.getClientId(context);
- String containerId = ((UIComponent) AjaxRendererUtils
- .findAjaxContainer(context, component)).getClientId(context);
utils.addToScriptHash(options, "mode",
component.getAttributes().get("mode"), "ajax");
utils.addToScriptHash(options, "minValue",
component.getAttributes().get("minValue"), "0");
@@ -279,8 +277,7 @@
utils.addToScriptHash(options, "state", state,
"initialState");
utils.addToScriptHash(options, "value",
variables.getVariable("value"));
- script.append("new
ProgressBar('").append(clientId).append("','") // id
- .append(containerId).append("'"); // containerId
+ script.append("new
ProgressBar('").append(clientId).append("'");
if (!options.isEmpty()) {
script.append(",").append(ScriptUtils.toScript(options));
}
@@ -298,7 +295,7 @@
*/
private Map buildAjaxOptions(String clientId, UIProgressBar progressBar,
FacesContext context) {
- Map options = AjaxRendererUtils.buildEventOptions(context, progressBar);
+ Map options = AjaxRendererUtils.buildEventOptions(context, progressBar, true);
Integer interval = new Integer(progressBar.getInterval());
options.put("pollId", clientId);
options.put("pollinterval", interval);
Modified:
branches/community/3.3.X/ui/progressBAR/src/main/resources/org/richfaces/renderkit/html/js/progressBar.js
===================================================================
---
branches/community/3.3.X/ui/progressBAR/src/main/resources/org/richfaces/renderkit/html/js/progressBar.js 2009-06-21
13:51:28 UTC (rev 14684)
+++
branches/community/3.3.X/ui/progressBAR/src/main/resources/org/richfaces/renderkit/html/js/progressBar.js 2009-06-21
13:57:33 UTC (rev 14685)
@@ -9,7 +9,7 @@
options : {},
state : "initialState",
- initialize: function(id, containerId, options) {
+ initialize: function(id, options) {
this.id = id;
Object.extend(this, options);
var f = this.getForm();
@@ -69,7 +69,7 @@
},
poll: function () {
- A4J.AJAX.Poll(this.containerId, this.formId, this.options);
+ A4J.AJAX.Poll(this.formId, this.options);
},
interpolate: function (placeholders) {
for(var k in this.context) {
@@ -248,6 +248,6 @@
if (oncomplete) {
options['oncomplete'] = oncomplete;
}
- A4J.AJAX.SubmitRequest(this.containerId, this.formId, null, options);
+ A4J.AJAX.SubmitRequest(this.formId, null, options);
}
});
Modified:
branches/community/3.3.X/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/ScrollableDataTableBaseRenderer.java
===================================================================
---
branches/community/3.3.X/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/ScrollableDataTableBaseRenderer.java 2009-06-21
13:51:28 UTC (rev 14684)
+++
branches/community/3.3.X/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/ScrollableDataTableBaseRenderer.java 2009-06-21
13:57:33 UTC (rev 14685)
@@ -628,7 +628,7 @@
public String getRowsAjaxUpdate(FacesContext context, UIScrollableDataTable grid){
JSFunction function = AjaxRendererUtils.buildAjaxFunction(grid, context);
- Map<String, Object> options = AjaxRendererUtils.buildEventOptions(context,
grid);
+ Map<String, Object> options = AjaxRendererUtils.buildEventOptions(context, grid,
true);
options.put("oncomplete", AjaxFunctionBuilder.getOnComplete(context, grid,
AjaxFunctionBuilder.SCROLL));
@SuppressWarnings("unchecked")
Modified:
branches/community/3.3.X/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/ScrollableDataTableOptions.java
===================================================================
---
branches/community/3.3.X/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/ScrollableDataTableOptions.java 2009-06-21
13:51:28 UTC (rev 14684)
+++
branches/community/3.3.X/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/ScrollableDataTableOptions.java 2009-06-21
13:57:33 UTC (rev 14685)
@@ -75,7 +75,7 @@
JSReference sortStartRow = new JSReference("event.startRow");
JSReference sortIndex = new JSReference("event.index");
- Map<String, Object> options = AjaxRendererUtils.buildEventOptions(context,
grid);
+ Map<String, Object> options = AjaxRendererUtils.buildEventOptions(context, grid,
true);
@SuppressWarnings("unchecked")
Map<String, Object> parametersMap = (Map)options.get("parameters");
Modified:
branches/community/3.3.X/ui/simpleTogglePanel/src/main/java/org/richfaces/renderkit/html/SimpleTogglePanelRenderer.java
===================================================================
---
branches/community/3.3.X/ui/simpleTogglePanel/src/main/java/org/richfaces/renderkit/html/SimpleTogglePanelRenderer.java 2009-06-21
13:51:28 UTC (rev 14684)
+++
branches/community/3.3.X/ui/simpleTogglePanel/src/main/java/org/richfaces/renderkit/html/SimpleTogglePanelRenderer.java 2009-06-21
13:57:33 UTC (rev 14685)
@@ -152,7 +152,7 @@
onClick.append(";");
JSFunction ajaxFunction = AjaxRendererUtils.buildAjaxFunction(tgComp, context);
- ajaxFunction.addParameter(AjaxRendererUtils.buildEventOptions(context,
tgComp));
+ ajaxFunction.addParameter(AjaxRendererUtils.buildEventOptions(context, tgComp,
true));
ajaxFunction.appendScript(onClick);
if (tgComp instanceof AjaxSupport) {
Modified:
branches/community/3.3.X/ui/suggestionbox/src/main/java/org/richfaces/renderkit/html/SuggestionBoxRenderer.java
===================================================================
---
branches/community/3.3.X/ui/suggestionbox/src/main/java/org/richfaces/renderkit/html/SuggestionBoxRenderer.java 2009-06-21
13:51:28 UTC (rev 14684)
+++
branches/community/3.3.X/ui/suggestionbox/src/main/java/org/richfaces/renderkit/html/SuggestionBoxRenderer.java 2009-06-21
13:57:33 UTC (rev 14685)
@@ -391,7 +391,7 @@
submitSuggest.addParameter(targetId);
submitSuggest.addParameter(component.getClientId(context));
submitSuggest.addParameter(component.getAttributes().get("onsubmit"));
- Map<String, Object> options = AjaxRendererUtils.buildEventOptions(context,
component);
+ Map<String, Object> options = AjaxRendererUtils.buildEventOptions(context,
component, true);
options.put("popup", component.getClientId(context));
for (int i = 0; i < OPTIONS.length; i++) {
String option = OPTIONS[i];
Modified:
branches/community/3.3.X/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js
===================================================================
---
branches/community/3.3.X/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js 2009-06-21
13:51:28 UTC (rev 14684)
+++
branches/community/3.3.X/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js 2009-06-21
13:57:33 UTC (rev 14685)
@@ -1008,7 +1008,7 @@
return;
}
- A4J.AJAX.Submit(this.containerId, this.actionUrl, event, this.options);
+ A4J.AJAX.Submit(this.actionUrl, event, this.options);
},
onComplete: function(request, event, data) {
Modified:
branches/community/3.3.X/ui/tabPanel/src/main/java/org/richfaces/renderkit/TabHeaderRendererBase.java
===================================================================
---
branches/community/3.3.X/ui/tabPanel/src/main/java/org/richfaces/renderkit/TabHeaderRendererBase.java 2009-06-21
13:51:28 UTC (rev 14684)
+++
branches/community/3.3.X/ui/tabPanel/src/main/java/org/richfaces/renderkit/TabHeaderRendererBase.java 2009-06-21
13:57:33 UTC (rev 14685)
@@ -133,7 +133,7 @@
JSFunction function = AjaxRendererUtils.buildAjaxFunction(tab,
context);
Map eventOptions = AjaxRendererUtils.buildEventOptions(context,
- tab);
+ tab, true);
function.addParameter(eventOptions);
StringBuffer buffer = new StringBuffer();
Modified:
branches/community/3.3.X/ui/togglePanel/src/main/java/org/richfaces/renderkit/html/ToggleControlRenderer.java
===================================================================
---
branches/community/3.3.X/ui/togglePanel/src/main/java/org/richfaces/renderkit/html/ToggleControlRenderer.java 2009-06-21
13:51:28 UTC (rev 14684)
+++
branches/community/3.3.X/ui/togglePanel/src/main/java/org/richfaces/renderkit/html/ToggleControlRenderer.java 2009-06-21
13:57:33 UTC (rev 14685)
@@ -113,7 +113,7 @@
} else if(UITogglePanel.AJAX_METHOD.equals(switchType)) {
// Ajax
if ( !getUtils().isBooleanAttribute(component,"disabled")) {
- return AjaxRendererUtils.buildOnClick(component, context).toString();
+ return AjaxRendererUtils.buildOnClick(component, context, true).toString();
} else {
return "return false;";
}
Modified:
branches/community/3.3.X/ui/tooltip/src/main/java/org/richfaces/renderkit/html/ToolTipRenderer.java
===================================================================
---
branches/community/3.3.X/ui/tooltip/src/main/java/org/richfaces/renderkit/html/ToolTipRenderer.java 2009-06-21
13:51:28 UTC (rev 14684)
+++
branches/community/3.3.X/ui/tooltip/src/main/java/org/richfaces/renderkit/html/ToolTipRenderer.java 2009-06-21
13:57:33 UTC (rev 14685)
@@ -154,7 +154,7 @@
public Map<String, Object> buildEventOptions(FacesContext context,
UIComponent component) {
Map<String, Object> eventOptions = AjaxRendererUtils.buildEventOptions(
- context, component);
+ context, component, true);
String clientId = component.getClientId(context);
String oncompleteTooltip = "; request.options.control.displayDiv();";
Modified:
branches/community/3.3.X/ui/tree/src/main/java/org/richfaces/renderkit/NodeRendererBase.java
===================================================================
---
branches/community/3.3.X/ui/tree/src/main/java/org/richfaces/renderkit/NodeRendererBase.java 2009-06-21
13:51:28 UTC (rev 14684)
+++
branches/community/3.3.X/ui/tree/src/main/java/org/richfaces/renderkit/NodeRendererBase.java 2009-06-21
13:57:33 UTC (rev 14685)
@@ -97,7 +97,7 @@
JSFunction function = AjaxRendererUtils.buildAjaxFunction(nodeFacet,
context);
Map<String, Object> eventOptions = AjaxRendererUtils.buildEventOptions(context,
- nodeFacet);
+ nodeFacet, true);
Map<String, Object> parameters = (Map<String, Object>)
eventOptions.get("parameters");
parameters.remove(id);
Modified:
branches/community/3.3.X/ui/tree/src/main/java/org/richfaces/renderkit/TreeRendererBase.java
===================================================================
---
branches/community/3.3.X/ui/tree/src/main/java/org/richfaces/renderkit/TreeRendererBase.java 2009-06-21
13:51:28 UTC (rev 14684)
+++
branches/community/3.3.X/ui/tree/src/main/java/org/richfaces/renderkit/TreeRendererBase.java 2009-06-21
13:57:33 UTC (rev 14685)
@@ -560,7 +560,7 @@
String id = tree.getBaseClientId(context);
JSFunction function = AjaxRendererUtils
.buildAjaxFunction(tree, context);
- Map eventOptions = AjaxRendererUtils.buildEventOptions(context, tree);
+ Map eventOptions = AjaxRendererUtils.buildEventOptions(context, tree, true);
Map parameters = (Map) eventOptions.get("parameters");
parameters.remove(id);
parameters.put(id + UITree.SELECTED_NODE_PARAMETER_NAME,