Blame view

src/main/config/component/watermark.xml 3.22 KB
bernard authored
1 2 3 4 5 6 7 8 9 10
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN"
        "http://labs.jboss.com/jbossrichfaces/component-config.dtd">

<components>
    <component>
        <name>org.richfaces.Watermark</name>
        <family>org.richfaces.Watermark</family>
        <classname>org.richfaces.component.html.HtmlWatermark</classname>
        <superclass>org.richfaces.component.UIWatermark</superclass>
        <description>
bernard authored
11 12 13 14 15 16
            <![CDATA[
                    Adds watermark capability to HTML input and textarea elements.
                    A watermark typically appears as light gray text within an input or textarea element whenever
                    the element is empty and does not have focus. This provides a hint to the user as to what
                    the input or textarea element is used for, or the type of input that is required.
                    ]]>
bernard authored
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
        </description>
        <renderer generate="true" override="true">
            <name>org.richfaces.component.renderkit.html.WatermarkRenderer</name>
            <template>htmlWatermark.jspx</template>
        </renderer>
        <tag>
            <name>watermark</name>
            <classname>org.richfaces.taglib.WatermarkTag</classname>
            <superclass>
                org.ajax4jsf.webapp.taglib.HtmlComponentTagBase
            </superclass>
        </tag>
        <taghandler generate="true">
            <classname>org.richfaces.taglib.WatermarkTagHandler</classname>
            <superclass>com.sun.facelets.tag.jsf.ComponentHandler</superclass>
bernard authored
32 33
        </taghandler>
        &ui_output_attributes;
bernard authored
34
        <property>
bernard authored
35
            <name>styleClass</name>
bernard authored
36
            <classname>java.lang.String</classname>
bernard authored
37 38
            <description>Assigns one or more CSS class names to the component. Corresponds to the HTML &quot;class&quot;
                attribute.
bernard authored
39 40
            </description>
        </property>
bernard authored
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
        <property>
            <name>suffix</name>
            <classname>java.lang.String</classname>
            <description>
                Use this if watermark should be attached to element with id different then component id.
                i.e.: rich:comboBox with id="combo" nested in form with id="f" renders input with
                clientId="f:combocomboboxField"
                So in order to attach watermark to that element provide suffix="comboboxField".
            </description>
        </property>
        <property>
            <name>for</name>
            <classname>java.lang.String</classname>
            <description>
                Use this if watermark cannot be nested within come components i.e. in calendar.

                Example 1: rich:calendar with id="c" nested in form with id="f" renders input with
                clientId="f:cInputDate".
                rich:calendar also gets messed up if watermark is nested within, so place it outside of calendar.
                So in order to attach watermark to that element provide for="c" suffix="InputDate".

                Example 2: watermark should be attached to pure html input (not jsf component) with id="htmlInput".
                To achieve this provide for="htmlInput".
            </description>
        </property>
bernard authored
66 67
    </component>
</components>