}
private CompositeComponentBeanInfo _createCompositeComponentMetadata(
FaceletContext ctx, UIComponent parent)
{
BeanDescriptor descriptor = new BeanDescriptor(parent.getClass());
CompositeComponentBeanInfo beanInfo = new CompositeComponentBeanInfo(descriptor);
// Add values to descriptor according to pld javadoc
if (_name != null)
{
descriptor.setName(_name.getValue(ctx));
}
if (_componentType != null)
{
// componentType is required by Application.createComponent(FacesContext, Resource)
// to instantiate the base component for this composite component. It should be
// as family javax.faces.NamingContainer .
descriptor.setValue(UIComponent.COMPOSITE_COMPONENT_TYPE_KEY,
_componentType.getValueExpression(ctx, String.class));
}
if (_displayName != null)
{
descriptor.setDisplayName(_displayName.getValue(ctx));
}
if (_preferred != null)
{
descriptor.setPreferred(_preferred.getBoolean(ctx));
}
if (_expert != null)
{
descriptor.setExpert(_expert.getBoolean(ctx));
}
if (_shortDescription != null)
{
descriptor.setShortDescription(_shortDescription.getValue(ctx));
}
return beanInfo;
}