FaceletContext faceletContext = (FaceletContext) context.getAttributes().get(FaceletContext.FACELET_CONTEXT_KEY);
cc = createComponent(faceletContext);
setCompositeComponent(context, cc);
}
MetaRuleset m = new CompositeComponentMetaRuleset(getTag(), type, (BeanInfo) cc.getAttributes().get(UIComponent.BEANINFO_KEY));
// ignore standard component attributes
m.ignore("binding").ignore("id");
m.addRule(CompositeComponentRule.Instance);
// if it's an ActionSource
if (ActionSource.class.isAssignableFrom(type)) {
m.addRule(ActionSourceRule.Instance);
}
// if it's a ValueHolder
if (ValueHolder.class.isAssignableFrom(type)) {
m.addRule(ValueHolderRule.Instance);
// if it's an EditableValueHolder
if (EditableValueHolder.class.isAssignableFrom(type)) {
m.ignore("submittedValue");
m.ignore("valid");
m.addRule(EditableValueHolderRule.Instance);
}
}
// if it's a selectone or selectmany
if (UISelectOne.class.isAssignableFrom(type) || UISelectMany.class.isAssignableFrom(type)) {
m.addRule(RenderPropertyRule.Instance);
}
return m;
}