public class HtmlWidgetVar extends SimpleVar
The format for this var is
Widgets are simple class that produce some sort of string based on a passed-in HTTP request.
They're registered via the following mechanisms:
Modifier and Type | Field and Description |
---|---|
static String |
NAME
The name of this variable.
|
static String |
SESSION_htmlWidgets
The name of the session or context object that identifies the object containing the widgets to resolve.
|
Constructor and Description |
---|
HtmlWidgetVar()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canResolve(VarResolverSession session)
Returns
|
String |
resolve(VarResolverSession session,
String key)
The interface that needs to be implemented for subclasses of
SimpleVar . |
allowNested, allowRecurse, doResolve, getName
public static final String SESSION_htmlWidgets
public static final String NAME
public HtmlWidgetVar()
public String resolve(VarResolverSession session, String key) throws Exception
Var
SimpleVar
.public boolean canResolve(VarResolverSession session)
Var
For example, some variable cannot resolve unless specific context or session objects are available.
canResolve
in class Var
session
- The current session.Copyright © 2016–2020 The Apache Software Foundation. All rights reserved.