org.apache.beehive.netui.tags.naming
Class FormDataNameInterceptor

Object
  extended by FormDataNameInterceptor
All Implemented Interfaces:
INameInterceptor

public class FormDataNameInterceptor
extends Object
implements INameInterceptor

A INameInterceptor that qualifies all non-expression attributes that are expected to be expressions into valid expressions. This conversion is for Struts compatability; In Struts, the "property" property is used to specify which property on the action form should be rendered in a tag's HTML. These attributes are converted into expressions by qualifying them into the actionForm binding context.

For example, the dataSource attribute on a text box tag would be qualified into the actionForm context if the attribute was not an expression.


Constructor Summary
FormDataNameInterceptor()
           
 
Method Summary
 String rewriteName(String name, Tag currentTag)
          Qualify the name of a NetUI JSP tag into the "actionForm" data binding context.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FormDataNameInterceptor

public FormDataNameInterceptor()
Method Detail

rewriteName

public String rewriteName(String name,
                          Tag currentTag)
                   throws ExpressionEvaluationException
Qualify the name of a NetUI JSP tag into the "actionForm" data binding context. This feature is used to convert non-expression tag names, as those used in Struts, into actionForm expressions that NetUI consumes.

Specified by:
rewriteName in interface INameInterceptor
Parameters:
name - the name to qualify into the actionForm binding context. If this is "foo", the returned value is {actionForm.foo}
Returns:
the qualified name or null if an error occurred
Throws:
ExpressionEvaluationException