Class ServerValuesVar
Resolves author-declared scalar values from a ServerValuesRegistry placed in the per-render session by
the widget emitter. It is a DefaultingVar: default when the provider is missing or returns
Not $W. This var emits declared scalar values as plain text (the caller places the returned
string into html5 beans and the serializer entity-encodes it). It is distinct from $W
(org.apache.juneau.html.HtmlWidgetVar), which emits raw widget HTML. $FV never injects
HTML.
allowRecurse() is
- Since:
- 10.0.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanReturns whether variables in the resolved contents of this variable should also be resolved.protected booleancanResolve(VarResolverSession session) Returnstrue if this variable can be resolved in the specified session.resolve(VarResolverSession session, String key) The interface that needs to be implemented for subclasses ofSimpleVar.Methods inherited from class org.apache.juneau.commons.svl.DefaultingVar
doResolveMethods inherited from class org.apache.juneau.commons.svl.Var
allowNested, getName, isStable
-
Field Details
-
NAME
The name of this variable.- See Also:
-
-
Constructor Details
-
ServerValuesVar
public ServerValuesVar()Constructor.
-
-
Method Details
-
allowRecurse
Description copied from class:VarReturns whether variables in the resolved contents of this variable should also be resolved.For example, if
"$X{xxx}" resolves to"$Y{xxx}" , then the $Y variable will be recursively resolved if this method returnstrue .The default implementation of this method always returns
true .
Subclasses can override this method to override the default behavior.As a general rule, variables that resolve user-entered data should not be recursively resolved as this may cause a security hole.- Overrides:
allowRecursein classVar- Returns:
true if resolved variables should be recursively resolved.
-
canResolve
Description copied from class:VarReturnstrue if this variable can be resolved in the specified session.For example, some variable cannot resolve unless specific context or session objects are available.
- Overrides:
canResolvein classVar- Parameters:
session- The current session.- Returns:
true if this variable can be resolved in the specified session.
-
resolve
Description copied from class:VarThe interface that needs to be implemented for subclasses ofSimpleVar.
-