// No root is specified, search whole page
root = ctx.getViewRoot();
}
// Iterate
IntegrationPoint point;
Iterator<IntegrationPoint> it = null;
int lastSize = 0;
int currSize = points.size();
String parentId = null;
String lastParentId = null;
while (currSize != lastSize) {
// Stop loop by comparing previous size
lastSize = currSize;
it = points.iterator();
lastParentId = "";
UIComponent parent = root;
// Iterate through the IntegrationPoints
while (it.hasNext()) {
point = it.next();
// Optimize for multiple plugins for the same parent
parentId = point.getParentId();
// Resolve any EL that may be used in identifying the parent ID
parentId = (String) ComponentUtil.getInstance(ctx).resolveValue(ctx, null, root, parentId);
if ((parentId == null) || !parentId.equals(lastParentId)) {
// New parent (or root -- null)
parent = getIntegrationPointParent(ctx, root, point);