2009/05/20 - Apache Shale has been retired.
For more information, please explore the Attic.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 package org.apache.shale.clay.parser.builder;
22
23 import org.apache.shale.clay.config.beans.ComponentBean;
24 import org.apache.shale.clay.config.beans.ElementBean;
25 import org.apache.shale.clay.parser.Node;
26
27 /***
28 * <p>
29 * Builds a {@link ElementBean} from a HTML {@link Node} where the
30 * {@link org.apache.shale.clay.parser.builder.chain.TextareaBuilderRule}
31 * handles the mapping.
32 * </p>
33 */
34 public class InputTextBuilder extends Builder {
35
36 /***
37 * <p>
38 * The default for this builder is that builder will handle the children
39 * html nodes meaning that the default should be <code>true</code>. The
40 * default can be overridden by the "allowBody" attribute in the component
41 * metadata.
42 * </p>
43 *
44 * @param node markup
45 * @param target child config bean
46 * @param root parent config bean
47 */
48 protected void encodeEnd(Node node, ElementBean target,
49 ComponentBean root) {
50 }
51
52 /***
53 * <p>
54 * Returns the <code>jsfid</code> used to populate the {@link ElementBean}.
55 * </p>
56 *
57 * @param node markup
58 * @return jsfid
59 */
60 protected String getJsfid(Node node) {
61 return "inputText";
62 }
63
64 /***
65 * <p>
66 * Returns the JSF componentType of
67 * <code>javax.faces.HtmlInputTextarea</code> used to define the
68 * {@link ElementBean} from the HTML {@link Node}.
69 * </p>
70 *
71 * @param node markup
72 * @return component type
73 */
74 protected String getComponentType(Node node) {
75 return "javax.faces.HtmlInputText";
76 }
77
78 }