Top Description Fields Constructors Methods
com.sun.faces.facelets.util

public Class FunctionLibrary

extends Object
implements TagLibrary
Class Inheritance
All Implemented Interfaces
com.sun.faces.facelets.tag.TagLibrary
Imports
com.sun.faces.facelets.tag.TagLibrary, com.sun.faces.util.Util, javax.faces.FacesException, javax.faces.view.facelets.Tag, .TagConfig, .TagHandler, java.lang.reflect.Method, .Modifier, java.util.HashMap, .Map

This TagLibrary exposes the public static methods defined on the functionsClass provided to the constructor as EL functions.

Field Summary

Modifier and TypeField and Description
private String
private Map<String, Method>
public static final String
public static final String

Constructor Summary

AccessConstructor and Description
public
FunctionLibrary(Class<?> functionsClass, String namespace)

Method Summary

Modifier and TypeMethod and Description
public boolean
containsFunction(String
namespace
ns
,
String
function name
name
)

Implements com.sun.faces.facelets.tag.TagLibrary.containsFunction.

If this library contains the specified function name
public boolean
containsNamespace(String
namespace
ns
,
Tag
the tag instance currently active at the time this method is called. May be null
t
)

Implements com.sun.faces.facelets.tag.TagLibrary.containsNamespace.

true if the namespace is used in this library
public boolean
containsTagHandler(String
namespace
ns
,
String
local name
localName
)

Implements com.sun.faces.facelets.tag.TagLibrary.containsTagHandler.

If this library contains a TagHandler for the namespace and local name true if handled by this library
public Method
createFunction(String
namespace
ns
,
String
function name
name
)

Implements com.sun.faces.facelets.tag.TagLibrary.createFunction.

Return a Method instance for the passed namespace and name
public TagHandler
createTagHandler(String
namespace
ns
,
String
local name
localName
,
TagConfig
configuration information
tag
)

Implements com.sun.faces.facelets.tag.TagLibrary.createTagHandler.

Create a new instance of a TagHandler, using the passed TagConfig
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_namespaceback to summary
private String _namespace
functionsback to summary
private Map<String, Method> functions
Namespaceback to summary
public static final String Namespace
XMLNSNamespaceback to summary
public static final String XMLNSNamespace

Constructor Detail

FunctionLibraryback to summary
public FunctionLibrary(Class<?> functionsClass, String namespace)

Method Detail

containsFunctionback to summary
public boolean containsFunction(String ns, String name)

Implements com.sun.faces.facelets.tag.TagLibrary.containsFunction.

Doc from com.sun.faces.facelets.tag.TagLibrary.containsFunction.

If this library contains the specified function name

Parameters
ns:String

namespace

name:String

function name

Returns:boolean

true if handled

Annotations
@Override
containsNamespaceback to summary
public boolean containsNamespace(String ns, Tag t)

Implements com.sun.faces.facelets.tag.TagLibrary.containsNamespace.

Doc from com.sun.faces.facelets.tag.TagLibrary.containsNamespace.

true if the namespace is used in this library

Parameters
ns:String

namespace

t:Tag

the tag instance currently active at the time this method is called. May be null

Annotations
@Override
containsTagHandlerback to summary
public boolean containsTagHandler(String ns, String localName)

Implements com.sun.faces.facelets.tag.TagLibrary.containsTagHandler.

Doc from com.sun.faces.facelets.tag.TagLibrary.containsTagHandler.

If this library contains a TagHandler for the namespace and local name true if handled by this library

Parameters
ns:String

namespace

localName:String

local name

Annotations
@Override
createFunctionback to summary
public Method createFunction(String ns, String name)

Implements com.sun.faces.facelets.tag.TagLibrary.createFunction.

Doc from com.sun.faces.facelets.tag.TagLibrary.createFunction.

Return a Method instance for the passed namespace and name

Parameters
ns:String

namespace

name:String

function name

Annotations
@Override
createTagHandlerback to summary
public TagHandler createTagHandler(String ns, String localName, TagConfig tag) throws FacesException

Implements com.sun.faces.facelets.tag.TagLibrary.createTagHandler.

Doc from com.sun.faces.facelets.tag.TagLibrary.createTagHandler.

Create a new instance of a TagHandler, using the passed TagConfig

Parameters
ns:String

namespace

localName:String

local name

tag:TagConfig

configuration information

Returns:TagHandler

a new TagHandler instance

Annotations
@Override