FacesContext context,
RenderingContext arc,
UIComponent component,
String clientId)
{
ClientRowKeyManager rowKeyManager = null;
if (component instanceof UIXCollection)
rowKeyManager = ((UIXCollection) component).getClientRowKeyManager();
Set<Object> rowKeys = null;
String tablePrefix = clientId + NamingContainer.SEPARATOR_CHAR;
// Search for any PPR targets that start with "<tableClientId>:"
PartialPageContext ppc = arc.getPartialPageContext();
Iterator<String> targets = ppc.getPartialTargets();
while (targets.hasNext())
{
String target = targets.next();
if (target == null)
continue;
if (target.startsWith(tablePrefix))
{
// If we don't have a rowkeymanager, we know that the table
// has partial targets, but we can't process the rows individually
if (rowKeyManager == null)
return null;
// Extract the client rowkey from the clientId
String clientRowKey = target.substring(tablePrefix.length());
int ncIndex = clientRowKey.indexOf(NamingContainer.SEPARATOR_CHAR);
// If we have a target that is in the table, but is not in a
// particular row, just repaint the whole table
if (ncIndex < 0)
return null;
clientRowKey = clientRowKey.substring(0, ncIndex);
// Try to turn it into a server rowkey
Object rowKey = rowKeyManager.getRowKey(context, component, clientRowKey);
// if this fails, we have to process the whole table
if (rowKey == null)
return null;
// We know this row exists, and needs to be processed