KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sourceforge > formview > displayer > IHTMLDisplayer


1 package net.sourceforge.formview.displayer;
2
3 import java.util.Map JavaDoc;
4
5 import au.id.jericho.lib.html.Element;
6 import au.id.jericho.lib.html.OutputDocument;
7 import net.sourceforge.formview.FieldView;
8
9 public interface IHTMLDisplayer {
10     
11     /**
12      * Return name of displayer for specific HTML element
13      * Name of displayer must be the same name of HTML element.
14      * (eg : return <b>select</b> if you want implement displayer
15      * for HTML select element.
16      * Use character <b>_</b> if you want filter about element
17      * type HTML.
18      * (eg : return input_text for displayer input type="text")
19      * @return name of displayer
20      */

21     public String JavaDoc getName();
22     
23     /**
24      * Return attribute names to parse
25      * for a displayer. Eg : name,id
26      * @return
27      */

28     public String JavaDoc getAttributesName();
29     
30     /**
31      * Transform current HTML element by adding (before, after
32      * HTML element) another HTML content, by adding HTML attribute
33      * to HTML element or by replacing HTML element by another
34      * HTML content.
35      * @param field characteristics (MAXLENGTH, REQUIRED, DATE).
36      * ATTENTION !!! this parameter can be null, when field are not
37      * defined into XML config form-view.xml.
38      * @param defaultBehaviour global behaviour of your form.
39      * @param contextValuesMap Map which contains keys/values context,
40      * which can be use to generate HTML (eg: key=${maxlength}
41      * value=50, you can use into HTML String
42      * <input maxlength="${maxlength}" /> and replace key by
43      * value to generate <input maxlength="50" />.
44      * @param htmlElement HTML (in) element
45      * @param htmlOutputDocument HTML output document which contains
46      * the whole HTML content after trenasformation.
47      */

48     public void processHTML(FieldView field, String JavaDoc defaultBehaviour, Map JavaDoc contextValuesMap, Element htmlElement, OutputDocument htmlOutputDocument);
49 }
50
Popular Tags