org.apache.beehive.netui.tags.naming
Class IndexedNameInterceptor
Object
IndexedNameInterceptor
- All Implemented Interfaces:
- INameInterceptor
public class IndexedNameInterceptor
- extends Object
- implements INameInterceptor
A INameInterceptor
that is used to rewrite names which
reference the container
databinding context. This
INameInterceptor is for use by tags that render form-updatable HTML
elements. If the dataSource attribute of the tag references a
container
binding context, the name must be qualified
into a real path down a bean / property hierarchy in order to
correctly update that value on a POST. This INameInterceptor
rewrites that name using the given name and the hierarchy of
IDataAccessProvider
tags in a JSP page.
Methods inherited from class Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IndexedNameInterceptor
public IndexedNameInterceptor()
rewriteName
public final String rewriteName(String name,
Tag currentTag)
throws ExpressionEvaluationException
- Rewrite an expression into a fully-qualified reference to a specific JavaBean property
on an object.
- Specified by:
rewriteName
in interface INameInterceptor
- Parameters:
name
- the expression to rewritecurrentTag
- the current JSP tag that can be used as the leaf for walking up
to find parent tags that provide information used to
rewrite the expression.
- Returns:
- String
- Throws:
ExpressionEvaluationException
getCurrentProvider
protected IDataAccessProvider getCurrentProvider(Tag tag)
- A default method to find the "current" IDataAccessProvider. This method is
left as non-final so that the implementation here can be tested
outside of a servlet container.
getExpressionEvaluator
protected ExpressionEvaluator getExpressionEvaluator()