KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > mmbase > bridge > jsp > taglib > typehandler > TypeHandler


1 /*
2
3 This software is OSI Certified Open Source Software.
4 OSI Certified is a certification mark of the Open Source Initiative.
5
6 The license (Mozilla version 1.0) can be read at the MMBase site.
7 See http://www.MMBase.org/license
8
9 */

10
11 package org.mmbase.bridge.jsp.taglib.typehandler;
12
13 import javax.servlet.jsp.JspTagException JavaDoc;
14
15 import org.mmbase.bridge.*;
16 import org.mmbase.bridge.jsp.taglib.ParamHandler;
17 import org.mmbase.storage.search.Constraint;
18
19 /**
20  * @javadoc
21  *
22  * @author Gerard van de Looi
23  * @since MMBase-1.6
24  * @version $Id: TypeHandler.java,v 1.9 2005/12/20 23:00:47 michiel Exp $
25  */

26
27 public interface TypeHandler {
28     /**
29      * Produces an form input field for the given Node, and Field.
30      * @param search if true, then a search field is produced.
31      */

32     public String JavaDoc htmlInput(Node node, Field field, boolean search) throws JspTagException JavaDoc;
33
34
35     /**
36      * Produces a div, containing the error message for the current value, or the empty string if everything ok.
37      * @param errors Whether to output the error messages (otherwises only invalidates form)
38      * @since MMBase-1.8
39      */

40     public String JavaDoc checkHtmlInput(Node node, Field field, boolean errors) throws JspTagException JavaDoc;
41
42     /**
43      * returns true if setValue happened.
44      */

45     
46     public boolean useHtmlInput(Node node, Field field) throws JspTagException JavaDoc;
47
48
49     /**
50      * @return Piece of SQL. null if no constraint.
51      *
52      */

53     public String JavaDoc whereHtmlInput(Field field) throws JspTagException JavaDoc;
54
55     /**
56      * @since MMBase-1.7
57      */

58     public void paramHtmlInput(ParamHandler handler, Field field) throws JspTagException JavaDoc;
59
60     /**
61      * @since MMBase-1.7
62      */

63     public Constraint whereHtmlInput(Field field, Query query) throws JspTagException JavaDoc;
64
65     /**
66      * @since MMBase-1.8
67      */

68     public void init();
69
70 }
71
Popular Tags