c = new UIInstructions(txt, applied);
// mark it owned by a facelet instance
//c.setId(ComponentSupport.getViewRoot(ctx, parent).createUniqueId());
AbstractFaceletContext actx = (AbstractFaceletContext) ctx;
UniqueIdVendor uniqueIdVendor = actx.getUniqueIdVendorFromStack();
if (uniqueIdVendor == null)
{
uniqueIdVendor = ComponentSupport.getViewRoot(ctx, parent);
}
if (uniqueIdVendor != null)
{
// UIViewRoot implements UniqueIdVendor, so there is no need to cast to UIViewRoot
// and call createUniqueId(). Also, note that UIViewRoot.createUniqueId() javadoc
// says we could send as seed the facelet generated id.
String uid = uniqueIdVendor.createUniqueId(ctx.getFacesContext(), id);
c.setId(uid);
}
c.getAttributes().put(ComponentSupport.MARK_CREATED, id);
}
// finish cleaning up orphaned children