org.mmbase.datatypes.handlers.html
Class BinaryHandler
java.lang.Object
org.mmbase.datatypes.handlers.AbstractHandler<String>
org.mmbase.datatypes.handlers.html.HtmlHandler
org.mmbase.datatypes.handlers.html.BinaryHandler
- All Implemented Interfaces:
- Serializable, Handler<String>
public class BinaryHandler
- extends HtmlHandler
The most straight forward implementation in HTML for an input widget for a binary field is a
'input' tag with type 'file'.
- Since:
- MMBase-1.9.1
- Version:
- $Id: BinaryHandler.java 46058 2011-11-23 13:13:03Z michiel $
- Author:
- Michiel Meeuwissen
- See Also:
- Serialized Form
|
Method Summary |
protected Object |
getFieldValue(Request request,
Node node,
Field field)
Returns the field value as specified by the client's post. |
String |
input(Request request,
Node node,
Field field,
boolean search)
Produces an form input field for the given Node, and Field. |
void |
setUseSpecificSetter(boolean s)
IF this is set it true the value is not set with Node.setValue(java.lang.String, java.lang.Object) but with Node.setInputStreamValue(java.lang.String, java.io.InputStream, long). |
protected void |
setValue(Request request,
Node node,
String fieldName,
Object value)
|
String |
toString()
|
| Methods inherited from class org.mmbase.datatypes.handlers.AbstractHandler |
cast, findString, getEvaluatedFieldValue, getFieldValue, getOperator, getSearchFieldValue, getSearchValue, getValue, id, interpretEmptyAsNull, search, set |
BinaryHandler
public BinaryHandler()
setUseSpecificSetter
public void setUseSpecificSetter(boolean s)
- IF this is set it true the value is not set with
Node.setValue(java.lang.String, java.lang.Object) but with Node.setInputStreamValue(java.lang.String, java.io.InputStream, long). The effect of this is that the method DataType.cast(java.lang.Object, org.mmbase.bridge.Node, org.mmbase.bridge.Field) is
avoided. This may be useful if the set-processor expects an InputStream, and not a
byte-array (or another type if this Handler is used on a non-binary field).
input
public String input(Request request,
Node node,
Field field,
boolean search)
- Description copied from interface:
Handler
- Produces an form input field for the given Node, and Field.
- Specified by:
input in interface Handler<String>- Specified by:
input in class AbstractHandler<String>
search - if true, then a search field is produced.
setValue
protected void setValue(Request request,
Node node,
String fieldName,
Object value)
- Overrides:
setValue in class AbstractHandler<String>
getFieldValue
protected Object getFieldValue(Request request,
Node node,
Field field)
- Returns the field value as specified by the client's post.
- Overrides:
getFieldValue in class AbstractHandler<String>
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.
toString
public String toString()
- Overrides:
toString in class Object
MMBase2 Bridge 2.0-SNAPSHOT - 2013-03-30T06:34