@Override protected MetaRuleset createMetaRuleset(Class type) { MetaRuleset ruleSet = super.createMetaRuleset(type); ruleSet.addRule(_DateTimeConverterRule.Instance); //Add locale rule ruleSet.addRule(_LocaleRule.Instance); //Add timeZone rule ruleSet.addRule(_TimeZoneRule.Instance); return ruleSet; } }
protected MetaRuleset createSubComponentMetaRuleset(Class aClass) { MetaRuleset metaRuleset = super.createMetaRuleset(aClass); //metaRuleset.ignore(Attributes.LABEL); metaRuleset.ignore(Attributes.TIP); metaRuleset.ignore("labelWidth"); if (SupportsMarkup.class.isAssignableFrom(aClass)) { metaRuleset.addRule(SupportsMarkupRule.INSTANCE); } if (InputSuggest.class.isAssignableFrom(aClass)) { metaRuleset.addRule(SuggestMethodRule.INSTANCE); } return metaRuleset; }
protected MetaRuleset createMetaRuleset(Class type) { TagAttributes attributes = this.tag.getAttributes(); TagAttribute eventAttribute = attributes.get("event"); TagAttribute showEventAttribute = attributes.get("showEvent"); MetaRuleset ruleset = super.createMetaRuleset(type); if (eventAttribute != null) { if (showEventAttribute != null) { TagAttribute idAttribute = attributes.get("id"); FacesContext facesContext = FacesContext.getCurrentInstance(); facesContext.getExternalContext().log("showEvent attribute has been already set for component with id: " + idAttribute != null ? idAttribute.getValue() : null + "[" + eventAttribute.getValue() + "]. event attribute is deprecated and thus has been dropped!"); ruleset.ignore("event"); } else { ruleset.alias("event", "showEvent"); } } return ruleset; } }
protected MetaRuleset createMetaRuleset(Class type) { return super.createMetaRuleset(type).alias("class", "styleClass"); }
private void setSubComponentAttributes(FaceletContext ctx, Object instance) { if (instance != null) { Class type = instance.getClass(); if (subComponentMapper == null || !subComponentLastType.equals(type)) { subComponentLastType = type; subComponentMapper = createSubComponentMetaRuleset(type).finish(); } subComponentMapper.applyMetadata(ctx, instance); } }
@Override protected MetaRuleset createMetaRuleset(Class type) { return super.createMetaRuleset(type).ignore("targetClass"); } }
protected MetaRuleset createMetaRuleset(Class type) { TagAttributes attributes = this.tag.getAttributes(); TagAttribute attribute = attributes.get("value"); if (attribute != null && attributes.get("selectedTab") != null) { TagAttribute idAttribute = attributes.get("id"); FacesContext facesContext = FacesContext.getCurrentInstance(); facesContext.getExternalContext().log("selectedTab attribute has been already set for component with id: " + idAttribute != null ? idAttribute.getValue() : null + "[" + attribute.getValue() + "]. value attribute is deprecated and thus has been dropped!"); } return super.createMetaRuleset(type).alias("selectedTab", "value"); }
private void setSubComponentAttributes(FaceletContext ctx, Object instance) { if (instance != null) { Class type = instance.getClass(); if (subComponentMapper == null || !subComponentLastType.equals(type)) { subComponentLastType = type; subComponentMapper = createSubComponentMetaRuleset(type).finish(); } subComponentMapper.applyMetadata(ctx, instance); } }
@Override protected MetaRuleset createMetaRuleset(Class type) { MetaRuleset ruleSet = super.createMetaRuleset(type); ruleSet.addRule(_DateTimeConverterRule.Instance); //Add locale rule ruleSet.addRule(_LocaleRule.Instance); //Add timeZone rule ruleSet.addRule(_TimeZoneRule.Instance); return ruleSet; } }
@Override protected MetaRuleset createMetaRuleset(Class type) { return super.createMetaRuleset(type).ignore("targetClass"); } }
/** * Invoking/extending this method will cause the results of the created * MetaRuleset to auto-wire state to the passed instance. * * @param ctx * @param instance */ protected void setAttributes(FaceletContext ctx, Object instance) { if (instance != null) { Class type = instance.getClass(); if (mapper == null || !this.lastType.equals(type)) { this.lastType = type; this.mapper = this.createMetaRuleset(type).finish(); } this.mapper.applyMetadata(ctx, instance); } } }
protected MetaRuleset createMetaRuleset(Class type) { return super.createMetaRuleset(type).ignore("binding"); } }
protected MetaRuleset createMetaRuleset(Class type) { MetaRuleset ruleSet = super.createMetaRuleset(type); //Add rule to handle EL expressions ruleSet.addRule(_ValidatorRule.Instance); return ruleSet; } }
protected MetaRuleset createMetaRuleset(Class type) { MetaRuleset m = super.createMetaRuleset(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); } } return m; }
protected MetaRuleset createMetaRuleset(Class type) { return super.createMetaRuleset(type).ignore("binding"); }