org.slim3.struts.taglib
Class S3Functions

java.lang.Object
  extended by org.slim3.struts.taglib.S3Functions

public class S3Functions
extends Object

JSP functions of Slim3.

Since:
3.0
Author:
higa

Constructor Summary
S3Functions()
           
 
Method Summary
static String br(String input)
          Converts line break to br tag.
static Date date(String input, String pattern)
          Converts string that could be interpreted as Date.
static String escape(String input)
          Escapes string that could be interpreted as HTML.
static String h(Object input)
          Escapes string that could be interpreted as HTML.
static String nbsp(String input)
          Converts space that could be interpreted as HTML.
static Number number(String input, String pattern)
          Converts string that could be interpreted as Number.
static String u(String input)
          Encodes string that could be interpreted as URL.
static String url(String input)
          Returns context-relative URL.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

S3Functions

public S3Functions()
Method Detail

h

public static String h(Object input)
Escapes string that could be interpreted as HTML.

Parameters:
input - the input value
Returns:
the escaped value

escape

public static String escape(String input)
Escapes string that could be interpreted as HTML.

Parameters:
input - the input value
Returns:
the escaped value

u

public static String u(String input)
Encodes string that could be interpreted as URL.

Parameters:
input - the input value
Returns:
the encoded value

url

public static String url(String input)
Returns context-relative URL.

Parameters:
input - the input value
Returns:
context-relative URL

date

public static Date date(String input,
                        String pattern)
                 throws NullPointerException,
                        RuntimeException
Converts string that could be interpreted as Date.

Parameters:
input - the input value
pattern - the date format pattern
Returns:
the converted value
Throws:
NullPointerException - if the pattern parameter is null
RuntimeException - if ParseException occurs

number

public static Number number(String input,
                            String pattern)
                     throws NullPointerException,
                            RuntimeException
Converts string that could be interpreted as Number.

Parameters:
input - the input value
pattern - the decimal format pattern
Returns:
the converted value
Throws:
NullPointerException - if the pattern parameter is null
RuntimeException - if ParseException occurs

br

public static String br(String input)
Converts line break to br tag.

Parameters:
input - the input value
Returns:
the converted value

nbsp

public static String nbsp(String input)
Converts space that could be interpreted as HTML.

Parameters:
input - the input value
Returns:
the converted value


Copyright © 2008-2009 The Slim3 project. All Rights Reserved.