org.apache.velocity.tools.generic
Class MarkupTool

java.lang.Object
  extended by org.apache.velocity.tools.generic.MarkupTool

@DefaultKey(value="markup")
public class MarkupTool
extends java.lang.Object

 Example uses in a template:
   #set( $foospan = $markup.span.id($foo.id).body($foo) )
   $markup.tag('table/tr.bar/td').body("This is $foospan")

 Output:
   
This is my first foo.
Example tools.xml config: <tools> <toolbox scope="application"> <tool class="org.apache.velocity.tools.generic.MarkupTool"/> </toolbox> </tools>

Since:
VelocityTools 2.0
Version:
$Id$
Author:
Nathan Bubna

Nested Class Summary
static class MarkupTool.Tag
           
 
Field Summary
static java.lang.String DEFAULT_ATTRIB_DELIM
           
static java.lang.String DEFAULT_ATTRIB_VALUE_END
           
static java.lang.String DEFAULT_ATTRIB_VALUE_START
           
static java.lang.String[] DEFAULT_CLOSE_BODY_TAG
           
static java.lang.String DEFAULT_NEW_LINE
           
static java.lang.String[] DEFAULT_NO_BODY_TAG
           
static java.lang.String[] DEFAULT_OPEN_BODY_TAG
           
static java.lang.String DEFAULT_TAB
           
 
Constructor Summary
MarkupTool()
           
 
Method Summary
 MarkupTool.Tag get(java.lang.String name)
           
 MarkupTool.Tag tag(java.lang.String haml)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_OPEN_BODY_TAG

public static final java.lang.String[] DEFAULT_OPEN_BODY_TAG

DEFAULT_CLOSE_BODY_TAG

public static final java.lang.String[] DEFAULT_CLOSE_BODY_TAG

DEFAULT_NO_BODY_TAG

public static final java.lang.String[] DEFAULT_NO_BODY_TAG

DEFAULT_TAB

public static final java.lang.String DEFAULT_TAB
See Also:
Constant Field Values

DEFAULT_NEW_LINE

public static final java.lang.String DEFAULT_NEW_LINE
See Also:
Constant Field Values

DEFAULT_ATTRIB_DELIM

public static final java.lang.String DEFAULT_ATTRIB_DELIM
See Also:
Constant Field Values

DEFAULT_ATTRIB_VALUE_START

public static final java.lang.String DEFAULT_ATTRIB_VALUE_START
See Also:
Constant Field Values

DEFAULT_ATTRIB_VALUE_END

public static final java.lang.String DEFAULT_ATTRIB_VALUE_END
See Also:
Constant Field Values
Constructor Detail

MarkupTool

public MarkupTool()
Method Detail

get

public MarkupTool.Tag get(java.lang.String name)

tag

public MarkupTool.Tag tag(java.lang.String haml)


Copyright (c) 2003-2007 Apache Software Foundation