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

java.lang.Object
  extended byorg.mmbase.bridge.jsp.taglib.typehandler.AbstractTypeHandler
      extended byorg.mmbase.bridge.jsp.taglib.typehandler.StringHandler
All Implemented Interfaces:
TypeHandler
Direct Known Subclasses:
XmlHandler

public class StringHandler
extends AbstractTypeHandler

A TypeHandler for strings, textareas and text-input. Search values are SQL escaped.

Since:
MMBase-1.6
Version:
$Id: StringHandler.java,v 1.27.2.6 2004/08/18 10:45:30 rob Exp $
Author:
Gerard van de Looi, Michiel Meeuwissen

Field Summary
 
Fields inherited from class org.mmbase.bridge.jsp.taglib.typehandler.AbstractTypeHandler
tag
 
Constructor Summary
StringHandler(FieldInfoTag tag)
          Constructor for StringHandler.
 
Method Summary
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)
           
 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 org.mmbase.bridge.jsp.taglib.typehandler.AbstractTypeHandler
addExtraAttributes, findString, paramHtmlInput, prefix
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringHandler

public StringHandler(FieldInfoTag tag)
Constructor for StringHandler.

Method Detail

htmlInput

public java.lang.String htmlInput(Node node,
                                  Field field,
                                  boolean search)
                           throws javax.servlet.jsp.JspTagException
Specified by:
htmlInput in interface TypeHandler
Overrides:
htmlInput in class AbstractTypeHandler
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
Overrides:
useHtmlInput in class AbstractTypeHandler
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
Overrides:
whereHtmlInput in class AbstractTypeHandler
Throws:
javax.servlet.jsp.JspTagException
See Also:
TypeHandler.whereHtmlInput(Field)

getOperator

protected int getOperator()
Description copied from class: AbstractTypeHandler
The operator to be used by whereHtmlInput(field, query)

Overrides:
getOperator in class AbstractTypeHandler

getSearchValue

protected java.lang.String getSearchValue(java.lang.String string)
Description copied from class: AbstractTypeHandler
Converts the value to the actual value to be searched. (mainly targeted at StringHandler).

Overrides:
getSearchValue in class AbstractTypeHandler

whereHtmlInput

public Constraint whereHtmlInput(Field field,
                                 Query query)
                          throws javax.servlet.jsp.JspTagException
Description copied from class: AbstractTypeHandler
Adds search constraint to Query object.

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


MMBase build 1.7.1.20041002