Package org.apache.struts2.ognl
Class OgnlValueStackFactory
java.lang.Object
org.apache.struts2.ognl.OgnlValueStackFactory
- All Implemented Interfaces:
ValueStackFactory
Creates an Ognl value stack
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected RootAccessor
protected Container
protected TextProvider
protected XWorkConverter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet a new instance ofValueStack
createValueStack
(ValueStack stack) Get a new instance ofValueStack
protected ValueStack
createValueStack
(ValueStack stack, boolean useTextProvider) protected void
Note that the defaultMethodAccessor
for handlingObject
methods is registered insetMethodAccessor(ognl.MethodAccessor)
and can be configured using the extension pointStrutsConstants.STRUTS_METHOD_ACCESSOR
.protected void
protected void
protected void
setCompoundRootAccessor
(RootAccessor compoundRootAccessor) protected void
setContainer
(Container container) PropertyAccessor
's,MethodAccessor
's andNullHandler
's are registered on a per-class basis by defining a bean adhering to the corresponding interface with a name corresponding to the class it is intended to handle.protected void
setMethodAccessor
(ognl.MethodAccessor methodAccessor) protected void
setTextProvider
(TextProvider textProvider) protected void
setXWorkConverter
(XWorkConverter converter)
-
Field Details
-
xworkConverter
-
compoundRootAccessor
-
textProvider
-
container
-
-
Constructor Details
-
OgnlValueStackFactory
public OgnlValueStackFactory()
-
-
Method Details
-
setXWorkConverter
-
setCompoundRootAccessor
-
setMethodAccessor
protected void setMethodAccessor(ognl.MethodAccessor methodAccessor) -
setTextProvider
-
createValueStack
Description copied from interface:ValueStackFactory
Get a new instance ofValueStack
- Specified by:
createValueStack
in interfaceValueStackFactory
- Returns:
- a new
ValueStack
.
-
createValueStack
Description copied from interface:ValueStackFactory
Get a new instance ofValueStack
- Specified by:
createValueStack
in interfaceValueStackFactory
- Parameters:
stack
- an existing stack to include.- Returns:
- a new
ValueStack
.
-
createValueStack
-
setContainer
PropertyAccessor
's,MethodAccessor
's andNullHandler
's are registered on a per-class basis by defining a bean adhering to the corresponding interface with a name corresponding to the class it is intended to handle.The only exception is the
MethodAccessor
for theObject
type which has its own extension point. -
registerAdditionalMethodAccessors
protected void registerAdditionalMethodAccessors()Note that the defaultMethodAccessor
for handlingObject
methods is registered insetMethodAccessor(ognl.MethodAccessor)
and can be configured using the extension pointStrutsConstants.STRUTS_METHOD_ACCESSOR
. -
registerNullHandlers
- Throws:
ClassNotFoundException
-
registerPropertyAccessors
- Throws:
ClassNotFoundException
-