@Override protected Tag createTag() throws JellyException { return new StaticTag(getNsUri(),getLocalName(),getElementName()); }
public void run(JellyContext context, XMLOutput output) throws JellyTagException { try { startNamespacePrefixes(output); } catch (SAXException e) { throw new JellyTagException("could not start namespace prefixes",e); tag = getTag(context); tag = findDynamicTag(context, (StaticTag) tag); setTag(tag,context); } catch (JellyException e) { throw new JellyTagException(e); setContextURLs(context); handleException(e); handleException(e); } finally { context.setCurrentURL(currentURL); endNamespacePrefixes(output); } catch (SAXException e) { throw new JellyTagException("could not end namespace prefixes",e);
/** * 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; } }
try { StaticTag tag = new StaticTag( namespaceURI, localName, qName ); StaticTagScript script = new StaticTagScript( new TagFactory() { public Tag createTag(String name, Attributes attributes) { ); String attrQName = list.getQName(i); script.addAttribute(attrQName, expression);
/** * Factory method to create a static Tag that represents some static content. * * <p> * Note that to if you use jelly:define taglib, these tags might turn out to be non-static * during the runtime. */ protected TagScript createStaticTag( final String namespaceURI, final String localName, final String qName, Attributes list) throws SAXException { try { StaticTagScript script = new StaticTagScript(); configureTagScript(script); configureStaticTagAttributes(script,list); return script; } catch (Exception e) { log.warn( "Could not create static tag for URI: " + namespaceURI + " tag name: " + localName, e); throw createSAXException(e); } }
public void run(JellyContext context, XMLOutput output) throws JellyTagException { try { startNamespacePrefixes(output); } catch (SAXException e) { throw new JellyTagException("could not start namespace prefixes",e); tag = getTag(context); tag = findDynamicTag(context, (StaticTag) tag); setTag(tag,context); } catch (JellyException e) { throw new JellyTagException(e); setContextURLs(context); handleException(e); handleException(e); } finally { context.setCurrentURL(currentURL); endNamespacePrefixes(output); } catch (SAXException e) { throw new JellyTagException("could not end namespace prefixes",e);
/** * 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; } }
/** * Factory method to create a static Tag that represents some static content. * * <p> * Note that to if you use jelly:define taglib, these tags might turn out to be non-static * during the runtime. */ protected TagScript createStaticTag( final String namespaceURI, final String localName, final String qName, Attributes list) throws SAXException { try { StaticTagScript script = new StaticTagScript(); configureTagScript(script); configureStaticTagAttributes(script,list); return script; } catch (Exception e) { log.warn( "Could not create static tag for URI: " + namespaceURI + " tag name: " + localName, e); throw createSAXException(e); } }
public void run(JellyContext context, XMLOutput output) throws JellyTagException { try { startNamespacePrefixes(output); } catch (SAXException e) { throw new JellyTagException("could not start namespace prefixes",e); tag = getTag(context); tag = findDynamicTag(context, (StaticTag) tag); setTag(tag,context); } catch (JellyException e) { throw new JellyTagException(e); setContextURLs(context); handleException(e); handleException(e); } finally { context.setCurrentURL(currentURL); endNamespacePrefixes(output); } catch (SAXException e) { throw new JellyTagException("could not end namespace prefixes",e);
@Override protected Tag createTag() throws JellyException { return new StaticTag(getNsUri(),getLocalName(),getElementName()); }
/** * 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; } }
/** * Factory method to create a static Tag that represents some static content. * * <p> * Note that to if you use jelly:define taglib, these tags might turn out to be non-static * during the runtime. */ protected TagScript createStaticTag( final String namespaceURI, final String localName, final String qName, Attributes list) throws SAXException { try { StaticTagScript script = new StaticTagScript(); configureTagScript(script); configureStaticTagAttributes(script,list); return script; } catch (Exception e) { log.warn( "Could not create static tag for URI: " + namespaceURI + " tag name: " + localName, e); throw createSAXException(e); } }
public void run(JellyContext context, XMLOutput output) throws JellyTagException { try { startNamespacePrefixes(output); } catch (SAXException e) { throw new JellyTagException("could not start namespace prefixes",e); tag = getTag(context); tag = findDynamicTag(context, (StaticTag) tag); setTag(tag,context); } catch (JellyException e) { throw new JellyTagException(e); setContextURLs(context); handleException(e); handleException(e); } finally { context.setCurrentURL(currentURL); endNamespacePrefixes(output); } catch (SAXException e) { throw new JellyTagException("could not end namespace prefixes",e);
@Override protected Tag createTag() throws JellyException { return new StaticTag(getNsUri(),getLocalName(),getElementName()); }
/** * 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; } }