org.mmbase.bridge.jsp.taglib.typehandler
Class BinaryHandler
java.lang.Object
org.mmbase.bridge.jsp.taglib.typehandler.AbstractTypeHandler
org.mmbase.bridge.jsp.taglib.typehandler.BinaryHandler
- All Implemented Interfaces:
- TypeHandler
- Direct Known Subclasses:
- ByteHandler
public class BinaryHandler
- extends AbstractTypeHandler
- Since:
- MMBase-1.8 (was named ByteHandler previously)
- Version:
- $Id: BinaryHandler.java 40137 2009-12-07 14:55:55Z michiel $
- Author:
- Gerard van de Looi, Michiel Meeuwissen
- Javadoc:
|
Method Summary |
String |
checkHtmlInput(Node node,
Field field,
boolean errors)
Produces a div, containing the error message for the current value, or the empty string if everything ok. |
protected SerializableInputStream |
getFieldValue(Node node,
Field field)
Returns the field value as specified by the client's post. |
protected InputStream |
getValue(Node node,
String fieldName)
|
String |
htmlInput(Node node,
Field field,
boolean search)
Produces an form input field for the given Node, and Field. |
boolean |
useHtmlInput(Node node,
Field field)
returns true if setValue happened. |
String |
whereHtmlInput(Field field)
|
| Methods inherited from class org.mmbase.bridge.jsp.taglib.typehandler.AbstractTypeHandler |
addExtraAttributes, cast, convertToValidate, findString, getClasses, getClassName, getEnumHandler, getFieldValue, getOperator, getOperator, getSearchValue, getSearchValue, htmlInputId, init, interpretEmptyAsNull, paramHtmlInput, prefix, prefixError, prefixID, setValue, whereHtmlInput |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BinaryHandler
public BinaryHandler(FieldInfoTag tag)
- Constructor
- Parameters:
tag -
htmlInput
public String htmlInput(Node node,
Field field,
boolean search)
throws JspTagException
- Description copied from interface:
TypeHandler
- Produces an form input field for the given Node, and Field.
- Specified by:
htmlInput in interface TypeHandler- Overrides:
htmlInput in class AbstractTypeHandler
search - if true, then a search field is produced.
- Throws:
JspTagException- See Also:
TypeHandler.htmlInput(Node, Field, boolean)
getValue
protected InputStream getValue(Node node,
String fieldName)
- Overrides:
getValue in class AbstractTypeHandler
getFieldValue
protected SerializableInputStream getFieldValue(Node node,
Field field)
throws JspTagException
- Returns the field value as specified by the client's post.
- Overrides:
getFieldValue in class AbstractTypeHandler
- Parameters:
node - This parameter could be used if the client does not fully specify the field's
value (possible e.g. with Date fields). The existing specification could be used then.
- Returns:
null if the client did not post, something else if it did. If the client
meant to set null, this method should return the empty string.
- Throws:
JspTagException
checkHtmlInput
public String checkHtmlInput(Node node,
Field field,
boolean errors)
throws JspTagException
- Description copied from interface:
TypeHandler
- Produces a div, containing the error message for the current value, or the empty string if everything ok.
- Specified by:
checkHtmlInput in interface TypeHandler- Overrides:
checkHtmlInput in class AbstractTypeHandler
errors - Whether to output the error messages (otherwises only invalidates form)
- Throws:
JspTagException
useHtmlInput
public boolean useHtmlInput(Node node,
Field field)
throws JspTagException
- Description copied from interface:
TypeHandler
- returns true if setValue happened.
- Specified by:
useHtmlInput in interface TypeHandler- Overrides:
useHtmlInput in class AbstractTypeHandler
- Throws:
JspTagException- See Also:
TypeHandler.useHtmlInput(Node, Field)
whereHtmlInput
public String whereHtmlInput(Field field)
throws JspTagException
- Specified by:
whereHtmlInput in interface TypeHandler- Overrides:
whereHtmlInput in class AbstractTypeHandler
- Returns:
- Piece of SQL. null if no constraint.
- Throws:
JspTagException- See Also:
TypeHandler.whereHtmlInput(Field)
MMBase 2.0-SNAPSHOT - null