net.sf.tapfx.easyinsert
Class EasyInsertTemplateParser

java.lang.Object
  extended by org.apache.tapestry.parse.TemplateParser
      extended by net.sf.tapfx.easyinsert.EasyInsertTemplateParser
All Implemented Interfaces:
org.apache.tapestry.parse.ITemplateParser

public class EasyInsertTemplateParser
extends org.apache.tapestry.parse.TemplateParser

For replacing ${something} into <span jwcid="@Insert" value="ognl:something"/>

Version:
$Id: EasyInsertTemplateParser.java,v 1.3 2005/11/04 23:42:43 andyhot Exp $
Author:
andyhot

Field Summary
 
Fields inherited from class org.apache.tapestry.parse.TemplateParser
IMPLICIT_ID_PATTERN, LOCALIZATION_KEY_ATTRIBUTE_NAME, RAW_ATTRIBUTE_NAME, SIMPLE_ID_PATTERN
 
Constructor Summary
EasyInsertTemplateParser()
           
 
Method Summary
protected static java.lang.String applyBinding(java.lang.String value)
           
protected static int insideTag(java.lang.String template)
           
protected static int insideTag(java.lang.String template, int start)
           
protected static int insideTag(java.lang.String template, int start, int end)
           
protected static boolean needsProcessing(java.lang.String value)
           
protected static boolean needsProcessing(java.lang.String value, java.lang.String prefix)
           
 org.apache.tapestry.parse.TemplateToken[] parse(char[] templateData, org.apache.tapestry.parse.ITemplateParserDelegate delegate, org.apache.hivemind.Resource resourceLocation)
           
protected static java.lang.String process(java.lang.String template)
           
protected static java.lang.String process(java.lang.String template, java.lang.String prefix)
           
 void setPrefix(java.lang.String prefix)
           
 void setPrefixes(java.util.List list)
          Sets the prefix from a list.
 
Methods inherited from class org.apache.tapestry.parse.TemplateParser
afterParse, attributeBeginEvent, attributeEndEvent, beforeParse, findValueCaselessly, getCurrentLocation, getTokens, parse, setFactory, tagBeginEvent, tagEndEvent, templateParseProblem, templateParseProblem
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EasyInsertTemplateParser

public EasyInsertTemplateParser()
Method Detail

setPrefix

public void setPrefix(java.lang.String prefix)

setPrefixes

public void setPrefixes(java.util.List list)
Sets the prefix from a list. Only the first element is used (for now). This is needed so that hivemind can inject gathered configurations.

Parameters:
list -

parse

public org.apache.tapestry.parse.TemplateToken[] parse(char[] templateData,
                                                       org.apache.tapestry.parse.ITemplateParserDelegate delegate,
                                                       org.apache.hivemind.Resource resourceLocation)
                                                throws org.apache.tapestry.parse.TemplateParseException
Specified by:
parse in interface org.apache.tapestry.parse.ITemplateParser
Overrides:
parse in class org.apache.tapestry.parse.TemplateParser
Throws:
org.apache.tapestry.parse.TemplateParseException

process

protected static java.lang.String process(java.lang.String template)

process

protected static java.lang.String process(java.lang.String template,
                                          java.lang.String prefix)

insideTag

protected static int insideTag(java.lang.String template,
                               int start,
                               int end)
Returns:
0 for no, 1 for yes and the tag has a jwcid, 2 for yes and the tag does NOT have a jwcid.

insideTag

protected static int insideTag(java.lang.String template,
                               int start)
Returns:
0 for no, 1 for yes and the tag has a jwcid, 2 for yes and the tag does NOT have a jwcid.

insideTag

protected static int insideTag(java.lang.String template)
Returns:
0 for no, 1 for yes and the tag has a jwcid, 2 for yes and the tag does NOT have a jwcid.

needsProcessing

protected static boolean needsProcessing(java.lang.String value)

needsProcessing

protected static boolean needsProcessing(java.lang.String value,
                                         java.lang.String prefix)

applyBinding

protected static java.lang.String applyBinding(java.lang.String value)


Copyright © 2005-2006 Andreas Andreou. All Rights Reserved.