private TagScript createTagScript(JellyContext context, String uri, String name) throws JellyException { TagLibrary lib = context.getTagLibrary(uri); if (lib==null) throw new JellyException("Undefined tag library namespace URI: "+uri); TagScript tagScript = lib.createTagScript(name, null/*this parameter appears to be unused.*/); if (tagScript!=null) return tagScript; tagScript = lib.createTagScript(name.replace('_','-'), null); if (tagScript!=null) return tagScript; throw new JellyException(String.format("name '%s' not found for '%s'", name, uri)); } }
public Expression createExpression( ExpressionFactory factory, TagScript tagScript, String attributeName, String attributeValue) throws JellyException { // #### may need to include some namespace URI information in the XPath instance? if (attributeName.equals("select") || attributeName.equals("sort")) { if ( log.isDebugEnabled() ) { log.debug( "Parsing XPath expression: " + attributeValue ); } Expression xpathExpr = createXPathTextExpression( attributeValue ); return new XPathExpression(attributeValue, xpathExpr, tagScript); } // will use the default expression instead return super.createExpression(factory, tagScript, attributeName, attributeValue); }
/** 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; }
TagScript script = taglib.createTagScript(localName, list); if ( script != null ) { configureTagScript(script); String attributeValue = list.getValue(i); Expression expression = taglib.createExpression( getExpressionFactory(), script,
/** Allows taglibs to use their own expression evaluation mechanism */ public Expression createExpression( ExpressionFactory factory, TagScript tagScript, String attributeName, String attributeValue) throws JellyException { ExpressionFactory myFactory = getExpressionFactory(); if (myFactory == null) { myFactory = factory; } if (myFactory != null) { return CompositeExpression.parse(attributeValue, myFactory); } // will use a constant expression instead return new ConstantExpression(attributeValue); }
/** Creates a new instance of FmtTagLibrary */ public FmtTagLibrary() { registerTag("bundle", BundleTag.class); registerTag("formatDate", FormatDateTag.class); registerTag("message", MessageTag.class); registerTag("param", ParamTag.class); registerTag("setBundle", SetBundleTag.class); registerTag("setLocale", SetLocaleTag.class); registerTag("setTimeZone", SetTimeZoneTag.class); registerTag("timeZone", TimeZoneTag.class); }
TagScript script = taglib.createTagScript(localName, list); if ( script != null ) { configureTagScript(script); String attributeValue = list.getValue(i); Expression expression = taglib.createExpression( getExpressionFactory(), script,
/** Allows taglibs to use their own expression evaluation mechanism */ public Expression createExpression( ExpressionFactory factory, TagScript tagScript, String attributeName, String attributeValue) throws JellyException { ExpressionFactory myFactory = getExpressionFactory(); if (myFactory == null) { myFactory = factory; } if (myFactory != null) { return CompositeExpression.parse(attributeValue, myFactory); } // will use a constant expression instead return new ConstantExpression(attributeValue); }
TagScript script = taglib.createTagScript(localName, list); if ( script != null ) { configureTagScript(script); String attributeValue = list.getValue(i); Expression expression = taglib.createExpression( getExpressionFactory(), script,
return super.createTagScript(name, attributes);
/** 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; }
public Expression createExpression( ExpressionFactory factory, TagScript tagScript, String attributeName, String attributeValue) throws JellyException { // #### may need to include some namespace URI information in the XPath instance? if (attributeName.equals("xpath")) { if ( log.isDebugEnabled() ) { log.debug( "Parsing XPath expression: " + attributeValue ); } // XPath xpath = new Dom4jXPath(attributeValue); Expression xpathExpr = super.createExpression( factory, tagScript, attributeName, attributeValue ); return new XPathExpression(attributeValue, xpathExpr, tagScript); } // will use the default expression instead return super.createExpression(factory, tagScript, attributeName, attributeValue); } }
/** Allows taglibs to use their own expression evaluation mechanism */ public Expression createExpression( ExpressionFactory factory, TagScript tagScript, String attributeName, String attributeValue) throws JellyException { ExpressionFactory myFactory = getExpressionFactory(); if (myFactory == null) { myFactory = factory; } if (myFactory != null) { return CompositeExpression.parse(attributeValue, myFactory); } // will use a constant expression instead return new ConstantExpression(attributeValue); }
TagScript script = taglib.createTagScript(localName, list); if ( script != null ) { configureTagScript(script); String attributeValue = list.getValue(i); Expression expression = taglib.createExpression( getExpressionFactory(), script,
return super.createTagScript(name, attributes);
/** 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; }
/** Allows taglibs to use their own expression evaluation mechanism */ public Expression createExpression( ExpressionFactory factory, TagScript tagScript, String attributeName, String attributeValue) throws JellyException { ExpressionFactory myFactory = getExpressionFactory(); if (myFactory == null) { myFactory = factory; } if (myFactory != null) { return CompositeExpression.parse(attributeValue, myFactory); } // will use a constant expression instead return new ConstantExpression(attributeValue); }
return super.createTagScript(name,attributes);
/** 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; }
return super.createTagScript(name,attributes);