org.mmbase.bridge.jsp.taglib.typehandler
Class AbstractTypeHandler

java.lang.Object
  extended byorg.mmbase.bridge.jsp.taglib.typehandler.AbstractTypeHandler
All Implemented Interfaces:
TypeHandler
Direct Known Subclasses:
ByteHandler, DateHandler, DefaultTypeHandler, DoubleHandler, DurationHandler, EnumHandler, FloatHandler, IntegerHandler, LongHandler, NodeHandler, StringHandler

public abstract class AbstractTypeHandler
extends java.lang.Object
implements TypeHandler

Since:
MMBase-1.6
Version:
$Id: AbstractTypeHandler.java,v 1.25.2.1 2004/04/23 13:38:07 michiel Exp $
Author:
Gerard van de Looi, Michiel Meeuwissen
Warning: No Java Documentation Available.

Field Summary
protected  FieldInfoTag tag
           
 
Constructor Summary
AbstractTypeHandler(FieldInfoTag tag)
          Constructor for AbstractTypeHandler.
 
Method Summary
protected  java.lang.StringBuffer addExtraAttributes(java.lang.StringBuffer buf)
           
protected  java.lang.String findString(Field field)
           
protected  int getOperator()
          The operator to be used by whereHtmlInput(field, query)
protected  java.lang.String getSearchValue(java.lang.String string)
          Converts the value to the actual value to be searched.
 java.lang.String htmlInput(Node node, Field field, boolean search)
           
 void paramHtmlInput(ParamHandler handler, Field field)
           
protected  java.lang.String prefix(java.lang.String s)
          Puts a prefix before a name.
 boolean useHtmlInput(Node node, Field field)
          returns true if setValue happened.
 java.lang.String whereHtmlInput(Field field)
           
 Constraint whereHtmlInput(Field field, Query query)
          Adds search constraint to Query object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tag

protected FieldInfoTag tag
Constructor Detail

AbstractTypeHandler

public AbstractTypeHandler(FieldInfoTag tag)
Constructor for AbstractTypeHandler.

Method Detail

addExtraAttributes

protected java.lang.StringBuffer addExtraAttributes(java.lang.StringBuffer buf)
                                             throws javax.servlet.jsp.JspTagException
Throws:
javax.servlet.jsp.JspTagException

htmlInput

public java.lang.String htmlInput(Node node,
                                  Field field,
                                  boolean search)
                           throws javax.servlet.jsp.JspTagException
Specified by:
htmlInput in interface TypeHandler
Throws:
javax.servlet.jsp.JspTagException
See Also:
TypeHandler.htmlInput(Node, Field, boolean)

useHtmlInput

public boolean useHtmlInput(Node node,
                            Field field)
                     throws javax.servlet.jsp.JspTagException
Description copied from interface: TypeHandler
returns true if setValue happened.

Specified by:
useHtmlInput in interface TypeHandler
Throws:
javax.servlet.jsp.JspTagException
See Also:
TypeHandler.useHtmlInput(Node, Field)

whereHtmlInput

public java.lang.String whereHtmlInput(Field field)
                                throws javax.servlet.jsp.JspTagException
Specified by:
whereHtmlInput in interface TypeHandler
Returns:
Piece of SQL. null if no constraint.
Throws:
javax.servlet.jsp.JspTagException
See Also:
TypeHandler.whereHtmlInput(Field)

getOperator

protected int getOperator()
The operator to be used by whereHtmlInput(field, query)

Since:
MMBase-1.7

getSearchValue

protected java.lang.String getSearchValue(java.lang.String string)
Converts the value to the actual value to be searched. (mainly targeted at StringHandler).

Since:
MMBase-1.7

findString

protected final java.lang.String findString(Field field)
                                     throws javax.servlet.jsp.JspTagException
Throws:
javax.servlet.jsp.JspTagException
Since:
MMBase-1.7

paramHtmlInput

public void paramHtmlInput(ParamHandler handler,
                           Field field)
                    throws javax.servlet.jsp.JspTagException
Specified by:
paramHtmlInput in interface TypeHandler
Throws:
javax.servlet.jsp.JspTagException

whereHtmlInput

public Constraint whereHtmlInput(Field field,
                                 Query query)
                          throws javax.servlet.jsp.JspTagException
Adds search constraint to Query object.

Specified by:
whereHtmlInput in interface TypeHandler
Returns:
null if nothing to be searched, the constraint if constraint added
Throws:
javax.servlet.jsp.JspTagException

prefix

protected java.lang.String prefix(java.lang.String s)
                           throws javax.servlet.jsp.JspTagException
Puts a prefix before a name. This is used in htmlInput and useHtmlInput, they need it to get a reasonably unique value for the name attribute of form elements.

Throws:
javax.servlet.jsp.JspTagException


MMBase build 1.7.1.20041002