Author: nbelaevski
Date: 2011-01-19 10:11:54 -0500 (Wed, 19 Jan 2011)
New Revision: 21085
Modified:
trunk/ui/common/ui/src/main/java/org/richfaces/component/UIDataAdaptor.java
trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/ExtendedDataTableRenderer.java
Log:
https://issues.jboss.org/browse/RF-10239
Modified: trunk/ui/common/ui/src/main/java/org/richfaces/component/UIDataAdaptor.java
===================================================================
--- trunk/ui/common/ui/src/main/java/org/richfaces/component/UIDataAdaptor.java 2011-01-19
14:58:13 UTC (rev 21084)
+++ trunk/ui/common/ui/src/main/java/org/richfaces/component/UIDataAdaptor.java 2011-01-19
15:11:54 UTC (rev 21085)
@@ -762,6 +762,10 @@
}
}
+ public String getContainerClientId() {
+ return getContainerClientId(getFacesContext());
+ }
+
@Override
public String getContainerClientId(FacesContext facesContext) {
if (facesContext == null) {
@@ -1148,7 +1152,7 @@
throw new NullPointerException();
}
- String baseId = super.getClientId(context);
+ String baseId = getClientId(context);
if (!matchesBaseId(clientId, baseId,
UINamingContainer.getSeparatorChar(context))) {
return false;
Modified:
trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/ExtendedDataTableRenderer.java
===================================================================
---
trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/ExtendedDataTableRenderer.java 2011-01-19
14:58:13 UTC (rev 21084)
+++
trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/ExtendedDataTableRenderer.java 2011-01-19
15:11:54 UTC (rev 21085)
@@ -560,8 +560,8 @@
encodeSelectionInput(writer, context, component);
writer.endUpdate();
writer.startEval();
- writer.write("jQuery('#" +
ScriptUtils.escapeCSSMetachars(clientId)
- + "').triggerHandler('rich:onajaxcomplete', {first:
" + table.getClientFirst() + "});");
+ writer.write("jQuery(" + ScriptUtils.toScript('#' +
ScriptUtils.escapeCSSMetachars(clientId))
+ + ").triggerHandler('rich:onajaxcomplete', {first:
" + table.getClientFirst() + "});");
writer.endEval();
table.setRowKey(context, key);
table.restoreOrigValue(context);
@@ -582,8 +582,8 @@
if (UIDataTableBase.HEADER.equals(metaComponentId)) {
encodeHeader(state);
writer.startEval();
- writer.write("jQuery('#" +
ScriptUtils.escapeCSSMetachars(table.getClientId(context))
- + "').triggerHandler('rich:onajaxcomplete',
{reinitializeHeader: true});");
+ writer.write("jQuery(" + ScriptUtils.toScript('#' +
ScriptUtils.escapeCSSMetachars(table.getClientId(context)))
+ + ").triggerHandler('rich:onajaxcomplete',
{reinitializeHeader: true});");
writer.endEval();
} else if (UIDataTableBase.FOOTER.equals(metaComponentId)) {
encodeFooter(state);
@@ -594,8 +594,8 @@
encodeSelectionInput(writer, context, component);
writer.endUpdate();
writer.startEval();
- writer.write("jQuery('#" +
ScriptUtils.escapeCSSMetachars(clientId)
- + "').triggerHandler('rich:onajaxcomplete',
{first: " + table.getClientFirst() + ", rowCount: "
+ writer.write("jQuery(" + ScriptUtils.toScript('#' +
ScriptUtils.escapeCSSMetachars(clientId))
+ + ").triggerHandler('rich:onajaxcomplete', {first:
" + table.getClientFirst() + ", rowCount: "
+ getRowCount(component) + ", reinitializeBody:
true});");
writer.endEval();
} else {