public BeanInfo createComponentMetadata(FacesContext context,
Resource ccResource) {
// PENDING this implementation is terribly wasteful.
// Must find a better way.
CompositeComponentBeanInfo result;
FaceletContext ctx = (FaceletContext)
context.getAttributes().get(FaceletContext.FACELET_CONTEXT_KEY);
DefaultFaceletFactory factory = (DefaultFaceletFactory)
RequestStateManager.get(context, RequestStateManager.FACELET_FACTORY);
VariableMapper orig = ctx.getVariableMapper();