public Metadata applyRule(String name, TagAttribute attribute, MetadataTarget meta) { if (meta.isTargetInstanceOf(ValidatorBase.class)) { // if component and dynamic, then must set expression if (!attribute.isLiteral()) { Class type = meta.getPropertyType(name); if (type == null) { type = Object.class; } return new ValueBindingMetadata(name, type, attribute); } } return null; } }
@Override public Metadata applyRule(String name, TagAttribute attribute, MetadataTarget meta) { if (meta.isTargetInstanceOf(DateRestrictionValidator.class)) { if ("invalidMonths".equals(name) || "invalidDaysOfWeek".equals(name)) { Method m = meta.getWriteMethod(name); Class type = meta.getPropertyType(name); if (type == null) { type = Object.class; } return new DateRestrictionMetadata(name, m, type, attribute); } } return null; }
public Metadata applyRule(String name, TagAttribute attribute, MetadataTarget meta) { if (false == name.equals(this.methodName)) return null; if (MethodBinding.class.equals(meta.getPropertyType(name))) { Method method = meta.getWriteMethod(name); if (method != null) { return new MethodBindingMetadata(method, attribute, this.returnTypeClass, this.params); } } else if (MethodExpression.class.equals(meta.getPropertyType(name))) { Method method = meta.getWriteMethod(name); if (method != null) { return new MethodExpressionMetadata(method, attribute, this.returnTypeClass, this.params); } } return null; }
public Metadata applyRule(String name, TagAttribute attribute, MetadataTarget metadataTarget) { if (metadataTarget.isTargetInstanceOf(SupportsMarkup.class)) { if (Attributes.MARKUP.equals(name)) { return new SupportsMarkupMapper(attribute); } } return null; }
public Metadata applyRule(String name, TagAttribute attribute, MetadataTarget meta) { if (meta.isTargetInstanceOf(ConverterBase.class)) { if ("timeZone".equals(name)) { // if component and dynamic, then must set expression if (!attribute.isLiteral()) { return new ValueExpressionMetadata(name, Object.class, attribute); } else { Method m = meta.getWriteMethod(name); return new LiteralPropertyMetadata(m, attribute); } } } return null; } }
public Metadata applyRule(String name, TagAttribute attribute, MetadataTarget meta) { if (meta.isTargetInstanceOf(UIComponent.class)) { // if component and dynamic, then must set expression if (!attribute.isLiteral()) { Class type = meta.getPropertyType(name); if (type == null) { type = Object.class; } if (FacesAPI.getComponentVersion(meta.getTargetClass()) >= 12) { return new ValueExpressionMetadata(name, type, attribute); } else { return new ValueBindingMetadata(name, type, attribute); } } else if (meta.getWriteMethod(name) == null) { // this was an attribute literal, but not property warnAttr(attribute, meta.getTargetClass(), name); return new LiteralAttributeMetadata(name, attribute.getValue()); } } return null; }
public Metadata applyRule(String name, TagAttribute attribute, MetadataTarget meta) { if (meta.isTargetInstanceOf(ActionSource.class)) { boolean elSupport = FacesAPI.getComponentVersion(meta .getTargetClass()) >= 12; if ("action".equals(name)) { if (elSupport && meta.isTargetInstanceOf(ActionSource2.class)) { return new ActionMapper2(attribute); } else { return new ActionMapper(attribute); } } if ("actionListener".equals(name)) { if (elSupport && meta.isTargetInstanceOf(ActionSource2.class)) { return new ActionListenerMapper2(attribute); } else { return new ActionListenerMapper(attribute); } } } return null; } }
public Metadata applyRule(String name, TagAttribute attribute, MetadataTarget meta) { Method m = meta.getWriteMethod(name); // if the property is writable if (m != null) { if (attribute.isLiteral()) { return new LiteralPropertyMetadata(m, attribute); } else { return new DynamicPropertyMetadata(m, attribute); } } return null; }
public Metadata applyRule(String name, TagAttribute attribute, MetadataTarget metadataTarget) { if (metadataTarget.isTargetInstanceOf(TabChangeSource.class)) { if ("tabChangeListener".equals(name)) { return new TabChangeListenerMapper(attribute); } } return null; }
public Metadata applyRule(String name, TagAttribute attribute, MetadataTarget meta) { if (meta.isTargetInstanceOf(ConverterBase.class)) { if ("timeZone".equals(name)) { // if component and dynamic, then must set expression if (!attribute.isLiteral()) { return new ValueBindingMetadata(name, Object.class, attribute); } else { Method m = meta.getWriteMethod(name); return new LiteralPropertyMetadata(m, attribute); } } } return null; } }
public Metadata applyRule(String name, TagAttribute attribute, MetadataTarget meta) { if (meta.isTargetInstanceOf(EditableValueHolder.class)) { boolean elSupport = FacesAPI.getComponentVersion(meta .getTargetClass()) >= 12; if ("validator".equals(name)) { if (attribute.isLiteral()) { return new LiteralValidatorMetadata(attribute.getValue()); } else if (elSupport) { return new ValidatorExpressionMetadata(attribute); } else { return new ValidatorBindingMetadata(attribute); } } if ("valueChangeListener".equals(name)) { if (elSupport) { return new ValueChangedExpressionMetadata(attribute); } else { return new ValueChangedBindingMetadata(attribute); } } } return null; }
public Metadata applyRule(String name, TagAttribute attribute, MetadataTarget meta) { if (meta.isTargetInstanceOf(ValidatorBase.class)) { // if component and dynamic, then must set expression if (!attribute.isLiteral()) { Class type = meta.getPropertyType(name); if (type == null) { type = Object.class; } return new ValueBindingMetadata(name, type, attribute); } } return null; } }
public Metadata applyRule(String name, TagAttribute attribute, MetadataTarget metadataTarget) { if (metadataTarget.isTargetInstanceOf(SupportsRenderedPartially.class)) { if (Attributes.RENDERED_PARTIALLY.equals(name)) { return new SupportsRenderedPartiallyMapper(attribute); } } return null; }
public Metadata applyRule(String name, TagAttribute attribute, MetadataTarget meta) { if (meta.isTargetInstanceOf(ConverterBase.class)) { if ("locale".equals(name)) { // if component and dynamic, then must set expression if (!attribute.isLiteral()) { return new ValueBindingMetadata(name, Object.class, attribute); } else { Method m = meta.getWriteMethod(name); return new LiteralPropertyMetadata(m, attribute); } } } return null; } }
public Metadata applyRule(String name, TagAttribute attribute, MetadataTarget meta) { if (meta.isTargetInstanceOf(ValueHolder.class)) { if ("converter".equals(name)) { if (attribute.isLiteral()) { return new LiteralConverterMetadata(attribute.getValue()); } else { if (FacesAPI.getComponentVersion(meta.getTargetClass()) >= 12) { return new DynamicConverterMetadata2(attribute); } else { return new DynamicConverterMetadata(attribute); } } } if ("value".equals(name)) { if (attribute.isLiteral()) { return new LiteralValueMetadata(attribute.getValue()); } else { if (FacesAPI.getComponentVersion(meta.getTargetClass()) >= 12) { return new DynamicValueExpressionMetadata(attribute); } else { return new DynamicValueBindingMetadata(attribute); } } } } return null; }
public Metadata applyRule(String name, TagAttribute attribute, MetadataTarget meta) { if (meta.isTargetInstanceOf(ConverterBase.class)) { // if component and dynamic, then must set expression if (!attribute.isLiteral()) { Class type = meta.getPropertyType(name); if (type == null) { type = Object.class; } return new ValueBindingMetadata(name, type, attribute); } } return null; } }
public Metadata applyRule(String name, TagAttribute attribute, MetadataTarget metadataTarget) { if (metadataTarget.isTargetInstanceOf(SortActionSource.class)) { if ("sortActionListener".equals(name)) { return new SortActionListenerMapper(attribute); } } return null; }
public Metadata applyRule(String name, TagAttribute attribute, MetadataTarget meta) { if (meta.isTargetInstanceOf(ConverterBase.class)) { if ("locale".equals(name)) { // if component and dynamic, then must set expression if (!attribute.isLiteral()) { return new ValueExpressionMetadata(name, Object.class, attribute); } else { Method m = meta.getWriteMethod(name); return new LiteralPropertyMetadata(m, attribute); } } } return null; } }
public Metadata applyRule(String name, TagAttribute attribute, MetadataTarget meta) { if (meta.isTargetInstanceOf(ValidatorBase.class)) { // if component and dynamic, then must set expression if (!attribute.isLiteral()) { Class type = meta.getPropertyType(name); if (type == null) { type = Object.class; } //if (FacesAPI.getComponentVersion(meta.getTargetClass()) >= 12) { return new ValueExpressionMetadata(name, type, attribute); //} else { // return new ValueBindingMetadata(name, type, attribute); //} } } return null; } }
public Metadata applyRule(String name, TagAttribute attribute, MetadataTarget metadataTarget) { if (metadataTarget.isTargetInstanceOf(SheetStateChangeSource.class)) { if ("stateChangeListener".equals(name)) { return new SheetStateChangeListenerMapper(attribute); } } return null; }