/** Creates a new Tag for the given tag name if it exists */ public Tag createTag(String name, Attributes attributes) throws JellyException { Object value = templates.get(name); if ( value instanceof Script ) { Script template = (Script) value; return new DynamicTag(template); } else if ( value instanceof TagFactory ) { TagFactory factory = (TagFactory) value; return factory.createTag(name, attributes); } else if ( parent != null ) { // delegate to the parent return parent.createTag(name, attributes); } return null; }
/** Creates a new Tag for the given tag name if it exists */ public Tag createTag(String name, Attributes attributes) throws JellyException { Object value = templates.get(name); if ( value instanceof Script ) { Script template = (Script) value; return new DynamicTag(template); } else if ( value instanceof TagFactory ) { TagFactory factory = (TagFactory) value; return factory.createTag(name, attributes); } else if ( parent != null ) { // delegate to the parent return parent.createTag(name, attributes); } return null; }
/** Creates a new Tag for the given tag name if it exists */ public Tag createTag(String name, Attributes attributes) throws JellyException { Object value = templates.get(name); if ( value instanceof Script ) { Script template = (Script) value; return new DynamicTag(template); } else if ( value instanceof TagFactory ) { TagFactory factory = (TagFactory) value; return factory.createTag(name, attributes); } else if ( parent != null ) { // delegate to the parent return parent.createTag(name, attributes); } return null; }
/** Creates a new Tag for the given tag name if it exists */ public Tag createTag(String name, Attributes attributes) throws JellyException { Object value = templates.get(name); if ( value instanceof Script ) { Script template = (Script) value; return new DynamicTag(template); } else if ( value instanceof TagFactory ) { TagFactory factory = (TagFactory) value; return factory.createTag(name, attributes); } else if ( parent != null ) { // delegate to the parent return parent.createTag(name, attributes); } return null; }
/** * Attempts to find a dynamically created tag that has been created since this * script was compiled */ protected Tag findDynamicTag(JellyContext context, StaticTag tag) throws JellyException { // lets see if there's a tag library for this URI... TagLibrary taglib = context.getTagLibrary( tag.getUri() ); if ( taglib != null ) { Tag newTag = taglib.createTag( tag.getLocalName(), getSaxAttributes() ); if ( newTag != null ) { newTag.setParent( tag.getParent() ); newTag.setBody( tag.getBody() ); return newTag; } } return tag; } }
/** * Attempts to find a dynamically created tag that has been created since this * script was compiled */ protected Tag findDynamicTag(JellyContext context, StaticTag tag) throws JellyException { // lets see if there's a tag library for this URI... TagLibrary taglib = context.getTagLibrary( tag.getUri() ); if ( taglib != null ) { Tag newTag = taglib.createTag( tag.getLocalName(), getSaxAttributes() ); if ( newTag != null ) { newTag.setParent( tag.getParent() ); newTag.setBody( tag.getBody() ); return newTag; } } return tag; } }
/** * Attempts to find a dynamically created tag that has been created since this * script was compiled */ protected Tag findDynamicTag(JellyContext context, StaticTag tag) throws JellyException { // lets see if there's a tag library for this URI... TagLibrary taglib = context.getTagLibrary( tag.getUri() ); if ( taglib != null ) { Tag newTag = taglib.createTag( tag.getLocalName(), getSaxAttributes() ); if ( newTag != null ) { newTag.setParent( tag.getParent() ); newTag.setBody( tag.getBody() ); return newTag; } } return tag; } }
/** * Attempts to find a dynamically created tag that has been created since this * script was compiled */ protected Tag findDynamicTag(JellyContext context, StaticTag tag) throws JellyException { // lets see if there's a tag library for this URI... TagLibrary taglib = context.getTagLibrary( tag.getUri() ); if ( taglib != null ) { Tag newTag = taglib.createTag( tag.getLocalName(), getSaxAttributes() ); if ( newTag != null ) { newTag.setParent( tag.getParent() ); newTag.setBody( tag.getBody() ); return newTag; } } return tag; } }