}
@Override
public MetaRuleset createMetaRuleset(Class type) {
Util.notNull("type", type);
MetaRuleset m = new MetaRulesetImpl(owner.getTag(), type);
// ignore standard component attributes
m.ignore("binding").ignore("id");
// add auto wiring for attributes
m.addRule(ComponentRule.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;
}