|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.loom.tags.functions.Functions
public class Functions
List of JSP functions included with Loom. For usage instructions, see loom-core.tld
| Constructor Summary | |
|---|---|
Functions()
|
|
| Method Summary | |
|---|---|
static boolean |
contains(java.lang.Object collection,
java.lang.Object item)
Return true if the collection/array contains the given item. |
static java.lang.String |
json(java.lang.Object value)
Serializes the provided argument as a JSON object |
static java.lang.String |
jsonView(java.lang.Object value,
java.lang.String viewClassName)
Serializes the provided argument as a JSON object using the provided view (see Jackson JsonView) |
static int |
random(int maxValue)
Return a random number between 0 (inclusive) and the provided value (exclusive) |
static java.lang.String |
truncate(java.lang.String str,
int maxWidth)
Abbreviates a String using ellipsis. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Functions()
| Method Detail |
|---|
@Function(example="${l:random(10)}")
public static int random(int maxValue)
@Function(example="<c:if test=\"${l:contains(collection, element)}\">")
public static boolean contains(java.lang.Object collection,
java.lang.Object item)
throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagException
@Function(example="${l:truncate(veryLongStringVar, 8)}")
public static java.lang.String truncate(java.lang.String str,
int maxWidth)
@Function(example="${l:json(value)}")
public static java.lang.String json(java.lang.Object value)
throws java.io.IOException
java.io.IOException
@Function(example="${l:jsonView(value, \'com.acme.json.FullView\')}")
public static java.lang.String jsonView(java.lang.Object value,
java.lang.String viewClassName)
throws java.io.IOException
java.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||