You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by mm...@apache.org on 2005/06/12 01:04:39 UTC

svn commit: r190180 - in /myfaces/trunk: conf/ src/components/org/apache/myfaces/custom/inputHtmlHelp/ src/components/org/apache/myfaces/custom/inputHtmlHelp/resource/ src/share/org/apache/myfaces/renderkit/html/ tlds/ tlds/entities/ webapps/examples/ webapps/examples/WEB-INF/ webapps/examples/inc/ webapps/src/example/org/apache/myfaces/examples/resource/

Author: mmarinschek
Date: Sat Jun 11 16:04:37 2005
New Revision: 190180

URL: http://svn.apache.org/viewcvs?rev=190180&view=rev
Log: (empty)

Added:
    myfaces/trunk/src/components/org/apache/myfaces/custom/inputHtmlHelp/
    myfaces/trunk/src/components/org/apache/myfaces/custom/inputHtmlHelp/HtmlInputTextHelp.java
    myfaces/trunk/src/components/org/apache/myfaces/custom/inputHtmlHelp/HtmlInputTextHelp.xml
    myfaces/trunk/src/components/org/apache/myfaces/custom/inputHtmlHelp/HtmlInputTextHelpTag.java
    myfaces/trunk/src/components/org/apache/myfaces/custom/inputHtmlHelp/HtmlTextHelpRenderer.java
    myfaces/trunk/src/components/org/apache/myfaces/custom/inputHtmlHelp/resource/
    myfaces/trunk/src/components/org/apache/myfaces/custom/inputHtmlHelp/resource/inputHtmlHelp.js
    myfaces/trunk/tlds/entities/html_input_help_attributes.xml
    myfaces/trunk/webapps/examples/inputHtmlHelp.jsp
Modified:
    myfaces/trunk/conf/faces-config.xml
    myfaces/trunk/src/share/org/apache/myfaces/renderkit/html/HtmlRendererUtils.java
    myfaces/trunk/tlds/myfaces_ext.tld
    myfaces/trunk/webapps/examples/WEB-INF/examples-config.xml
    myfaces/trunk/webapps/examples/inc/navigation.jsp
    myfaces/trunk/webapps/src/example/org/apache/myfaces/examples/resource/example_messages.properties

Modified: myfaces/trunk/conf/faces-config.xml
URL: http://svn.apache.org/viewcvs/myfaces/trunk/conf/faces-config.xml?rev=190180&r1=190179&r2=190180&view=diff
==============================================================================
--- myfaces/trunk/conf/faces-config.xml (original)
+++ myfaces/trunk/conf/faces-config.xml Sat Jun 11 16:04:37 2005
@@ -59,6 +59,11 @@
   </component>
 
   <component>
+    <component-type>org.apache.myfaces.HtmlInputTextHelp</component-type>
+    <component-class>org.apache.myfaces.custom.inputHtmlHelp.HtmlInputTextHelp</component-class>
+  </component>
+
+  <component>
     <component-type>org.apache.myfaces.HtmlInputTextarea</component-type>
     <component-class>org.apache.myfaces.component.html.ext.HtmlInputTextarea</component-class>
   </component>
@@ -417,6 +422,12 @@
             <component-family>javax.faces.Input</component-family>
             <renderer-type>org.apache.myfaces.Text</renderer-type>
             <renderer-class>org.apache.myfaces.renderkit.html.ext.HtmlTextRenderer</renderer-class>
+        </renderer>
+
+        <renderer>
+            <component-family>javax.faces.Input</component-family>
+            <renderer-type>org.apache.myfaces.TextHelp</renderer-type>
+            <renderer-class>org.apache.myfaces.custom.inputHtmlHelp.HtmlTextHelpRenderer</renderer-class>
         </renderer>
 
         <renderer>

Added: myfaces/trunk/src/components/org/apache/myfaces/custom/inputHtmlHelp/HtmlInputTextHelp.java
URL: http://svn.apache.org/viewcvs/myfaces/trunk/src/components/org/apache/myfaces/custom/inputHtmlHelp/HtmlInputTextHelp.java?rev=190180&view=auto
==============================================================================
--- myfaces/trunk/src/components/org/apache/myfaces/custom/inputHtmlHelp/HtmlInputTextHelp.java (added)
+++ myfaces/trunk/src/components/org/apache/myfaces/custom/inputHtmlHelp/HtmlInputTextHelp.java Sat Jun 11 16:04:37 2005
@@ -0,0 +1,93 @@
+package org.apache.myfaces.custom.inputHtmlHelp;
+
+import org.apache.myfaces.component.html.util.HtmlComponentUtils;
+
+import javax.faces.el.ValueBinding;
+import javax.faces.context.FacesContext;
+
+/**
+ * @author Thomas Obereder
+ * @version $Date: 2005-07-02 15:32:34 +01:00 (Thu, 09 Jun 2005)
+ */
+public class HtmlInputTextHelp extends javax.faces.component.html.HtmlInputText
+{
+    public static final String JS_FUNCTION_SELECT_TEXT = "selectText";
+    public static final String JS_FUNCTION_RESET_HELP = "resetHelpValue";
+    public static final String COMPONENT_TYPE = "org.apache.myfaces.HtmlInputTextHelp";
+
+    private String _helpText = null;
+    private Boolean _selectText = null;
+    private Boolean _addResources = null;
+
+    public String getClientId(FacesContext context)
+    {
+        String clientId = HtmlComponentUtils.getClientId(this, getRenderer(context), context);
+        if (clientId == null)
+        {
+            clientId = super.getClientId(context);
+        }
+
+        return clientId;
+    }
+
+    public HtmlInputTextHelp()
+    {
+    }
+
+    public String getHelpText()
+    {
+        if(_helpText != null) return _helpText;
+        ValueBinding vb = getValueBinding("helpText");
+        return vb != null ? (String)vb.getValue(getFacesContext()) : null;
+    }
+
+    public void setHelpText(String helpText)
+    {
+        _helpText = helpText;
+    }
+
+    public boolean isSelectText()
+    {
+        if (_selectText != null) return _selectText.booleanValue();
+        ValueBinding vb = getValueBinding("selectText");
+        Boolean v = vb != null ? (Boolean)vb.getValue(getFacesContext()) : null;
+        return v != null ? v.booleanValue() : false;
+    }
+
+    public void setSelectText(boolean selectText)
+    {
+        _selectText = Boolean.valueOf(selectText);
+    }
+
+    public boolean isAddResources()
+    {
+        if (_addResources != null) return _addResources.booleanValue();
+        ValueBinding vb = getValueBinding("addResources");
+        Boolean v = vb != null ? (Boolean)vb.getValue(getFacesContext()) : null;
+        return v != null ? v.booleanValue() : false;
+    }
+
+    public void setAddResources(boolean addResources)
+    {
+        _addResources = Boolean.valueOf(addResources);
+    }
+
+    public Object saveState(FacesContext context)
+    {
+        Object[] state = new Object[4];
+        state[0] = super.saveState(context);
+        state[1] = _helpText;
+        state[2] = _selectText;
+        state[3] = _addResources;
+        return state;
+    }
+
+    public void restoreState(FacesContext context, Object state)
+    {
+        Object values[] = (Object[])state;
+        super.restoreState(context, values[0]);
+        _helpText = (String)values[1];
+        _selectText = (Boolean)values[2];
+        _addResources = (Boolean)values[3];
+    }
+}

Added: myfaces/trunk/src/components/org/apache/myfaces/custom/inputHtmlHelp/HtmlInputTextHelp.xml
URL: http://svn.apache.org/viewcvs/myfaces/trunk/src/components/org/apache/myfaces/custom/inputHtmlHelp/HtmlInputTextHelp.xml?rev=190180&view=auto
==============================================================================
--- myfaces/trunk/src/components/org/apache/myfaces/custom/inputHtmlHelp/HtmlInputTextHelp.xml (added)
+++ myfaces/trunk/src/components/org/apache/myfaces/custom/inputHtmlHelp/HtmlInputTextHelp.xml Sat Jun 11 16:04:37 2005
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE component PUBLIC
+  "-//MyFaces//DTD MyFaces component def 1.0//EN"
+  "http://myfaces.apache.org/dtd/Component.dtd">
+<component generateStateMethods="true">
+    <component-class>org.apache.myfaces.custom.inputHtmlHelp.HtmlInputTextHelp</component-class>
+    <base-class>javax.faces.component.html.HtmlInputText</base-class>
+    <component-type>org.apache.myfaces.HtmlInputTextHelp</component-type>
+    <field>
+        <name>helpText</name>
+        <type>java.lang.String</type>
+    </field>
+    <field>
+        <name>selectText</name>
+        <type>boolean</type>
+    </field>
+    <field>
+        <name>addResources</name>
+        <type>boolean</type>
+    </field>
+</component>
\ No newline at end of file

Added: myfaces/trunk/src/components/org/apache/myfaces/custom/inputHtmlHelp/HtmlInputTextHelpTag.java
URL: http://svn.apache.org/viewcvs/myfaces/trunk/src/components/org/apache/myfaces/custom/inputHtmlHelp/HtmlInputTextHelpTag.java?rev=190180&view=auto
==============================================================================
--- myfaces/trunk/src/components/org/apache/myfaces/custom/inputHtmlHelp/HtmlInputTextHelpTag.java (added)
+++ myfaces/trunk/src/components/org/apache/myfaces/custom/inputHtmlHelp/HtmlInputTextHelpTag.java Sat Jun 11 16:04:37 2005
@@ -0,0 +1,57 @@
+package org.apache.myfaces.custom.inputHtmlHelp;
+
+import org.apache.myfaces.taglib.html.HtmlInputTextTagBase;
+
+import javax.faces.component.UIComponent;
+
+/**
+ * @author Thomas Obereder
+ * @version Date: 09.06.2005, 22:16:41
+ */
+public class HtmlInputTextHelpTag extends HtmlInputTextTagBase
+{
+    private String _helpText = null;
+    private String _selectText = null;
+    private String _addResources = null;
+
+    public String getComponentType()
+    {
+        return HtmlInputTextHelp.COMPONENT_TYPE;
+    }
+
+    public String getRendererType()
+    {
+        return "org.apache.myfaces.TextHelp";
+    }
+
+    public void release()
+    {
+        super.release();
+
+        _helpText = null;
+        _selectText = null;
+        _addResources = null;
+    }
+
+    protected void setProperties(UIComponent component)
+    {
+        super.setProperties(component);
+        
+        setStringProperty(component, "helpText", _helpText);
+        setBooleanProperty(component, "selectText", _selectText);
+        setBooleanProperty(component, "addResources", _addResources);
+    }
+
+    public void setHelpText(String helpText)
+    {
+        _helpText = helpText;
+    }
+    public void setSelectText(String selectText)
+    {
+        _selectText = selectText;
+    }
+    public void setAddResources(String addResources)
+    {
+        _addResources = addResources;
+    }
+}

Added: myfaces/trunk/src/components/org/apache/myfaces/custom/inputHtmlHelp/HtmlTextHelpRenderer.java
URL: http://svn.apache.org/viewcvs/myfaces/trunk/src/components/org/apache/myfaces/custom/inputHtmlHelp/HtmlTextHelpRenderer.java?rev=190180&view=auto
==============================================================================
--- myfaces/trunk/src/components/org/apache/myfaces/custom/inputHtmlHelp/HtmlTextHelpRenderer.java (added)
+++ myfaces/trunk/src/components/org/apache/myfaces/custom/inputHtmlHelp/HtmlTextHelpRenderer.java Sat Jun 11 16:04:37 2005
@@ -0,0 +1,164 @@
+package org.apache.myfaces.custom.inputHtmlHelp;
+
+import org.apache.myfaces.renderkit.html.HtmlTextRendererBase;
+import org.apache.myfaces.renderkit.html.HtmlRendererUtils;
+import org.apache.myfaces.renderkit.html.HTML;
+import org.apache.myfaces.renderkit.html.util.HTMLEncoder;
+import org.apache.myfaces.renderkit.RendererUtils;
+import org.apache.myfaces.component.html.util.AddResource;
+
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIInput;
+
+import java.io.IOException;
+
+/**
+ * @author Thomas Obereder
+ * @version Date: 09.06.2005, 22:50:48
+ */
+public class HtmlTextHelpRenderer extends HtmlTextRendererBase
+{
+    public void encodeEnd(FacesContext facesContext, UIComponent component)
+            throws IOException
+    {
+        if(component instanceof HtmlInputTextHelp)
+        {
+            HtmlInputTextHelp helpTextComp = (HtmlInputTextHelp) component;
+            //TODO replace with js import
+            if(isAddResources(component))
+                renderHelpTextJSFunctions(component, facesContext.getResponseWriter());
+//            addJavaScriptResources(facesContext);
+            renderInputTextHelp(facesContext, (UIInput)helpTextComp);
+        }
+        else
+        {
+            super.encodeEnd(facesContext, component);
+        }
+    }
+
+    public static boolean isSelectText(UIComponent component)
+    {
+        if(component instanceof HtmlInputTextHelp)
+        {
+            HtmlInputTextHelp helpTextComp = (HtmlInputTextHelp) component;
+            return helpTextComp.isSelectText();
+        }
+        return false;
+    }
+
+    public static String getHelpText(UIComponent component)
+    {
+        if(component instanceof HtmlInputTextHelp)
+        {
+            HtmlInputTextHelp helpTextComp = (HtmlInputTextHelp) component;
+            if(helpTextComp.getHelpText() != null)
+                return helpTextComp.getHelpText();
+        }
+        return null;
+    }
+
+    public static boolean isAddResources(UIComponent component)
+    {
+        if(component instanceof HtmlInputTextHelp)
+        {
+            HtmlInputTextHelp helpTextComp = (HtmlInputTextHelp) component;
+            return helpTextComp.isAddResources();
+        }
+        return false;
+    }
+
+    public static void renderInputTextHelp(FacesContext facesContext, UIInput input)
+            throws IOException
+    {
+        ResponseWriter writer = facesContext.getResponseWriter();
+
+        writer.startElement(HTML.INPUT_ELEM, input);
+
+        HtmlRendererUtils.writeIdIfNecessary(writer, input, facesContext);
+
+        renderHelpTextAttributes(input, writer, facesContext);
+
+        String value = RendererUtils.getStringValue(facesContext, input);
+        value = (value.equals("") || value == null) ? getHelpText(input) : "";
+
+        writer.writeAttribute(HTML.VALUE_ATTR, HTMLEncoder.encode(value,true,true), null);
+
+        writer.endElement(HTML.INPUT_ELEM);
+    }
+
+    public static void renderHelpTextAttributes(UIComponent component,
+                                                ResponseWriter writer,
+                                                FacesContext facesContext)
+            throws IOException
+    {
+        if(!(component instanceof HtmlInputTextHelp))
+        {
+            HtmlRendererUtils.renderHTMLAttributes(writer, component, HTML.COMMON_PASSTROUGH_ATTRIBUTES);
+            return;
+        }
+        else
+        {
+            String id = component.getClientId(facesContext);
+            if(isSelectText(component))
+            {
+                HtmlRendererUtils.renderHTMLAttributes(writer, component,
+                        HTML.COMMON_PASSTROUGH_ATTRIBUTES_WITHOUT_ONCLICK);
+                writer.writeAttribute(HTML.ONCLICK_ATTR,
+                        HtmlInputTextHelp.JS_FUNCTION_SELECT_TEXT + "('" + id +"')", null);
+            }
+            else
+            {
+                if(getHelpText(component) != null)
+                {
+                    HtmlRendererUtils.renderHTMLAttributes(writer, component,
+                            HTML.COMMON_PASSTROUGH_ATTRIBUTES_WITHOUT_ONCLICK);
+                    writer.writeAttribute(HTML.ONCLICK_ATTR,
+                            HtmlInputTextHelp.JS_FUNCTION_RESET_HELP + "('" +
+                            getHelpText(component) + "', '" + id +"')", null);
+                }
+                else
+                {
+                    HtmlRendererUtils.renderHTMLAttributes(writer,
+                            component, HTML.COMMON_PASSTROUGH_ATTRIBUTES);
+                }
+            }
+        }
+    }
+
+    //TODO
+    public static void renderHelpTextJSFunctions(UIComponent comp,
+                                                ResponseWriter writer)
+            throws IOException
+    {
+        if(getHelpText(comp) != null)
+        {
+            writer.startElement(HTML.SCRIPT_ELEM, comp);
+            writer.writeAttribute(HTML.TYPE_ATTR,
+                    HTML.SCRIPT_TYPE_TEXT_JAVASCRIPT, null);
+            writer.write("\n<!--\nfunction " + HtmlInputTextHelp.JS_FUNCTION_RESET_HELP + "(helpText, id)\n" +
+                    "{\n\t" +
+                    "var element=document.getElementById(id);\n\t"+
+                    "if(element.value==helpText)\n\t" +
+                    "{\n\t\t" +
+                    "element.value=''\n\t" +
+                    "}\n" +
+                    "}\n//-->\n");
+            writer.write("\n<!--\nfunction " + HtmlInputTextHelp.JS_FUNCTION_SELECT_TEXT + "(id)\n" +
+                    "{\n\t" +
+                    "var element=document.getElementById(id);\n\t"+
+                    "element.select();\n\t" +
+                    "}\n//-->\n");
+            writer.endElement(HTML.SCRIPT_ELEM);
+        }
+    }
+
+    //TODO
+    public static void addJavaScriptResources(FacesContext facesContext) throws IOException
+    {
+        AddResource.addJavaScriptToHeader(HtmlTextHelpRenderer.class,
+                                            "inputHtmlHelp.js",
+                                            facesContext);
+    }
+}

Added: myfaces/trunk/src/components/org/apache/myfaces/custom/inputHtmlHelp/resource/inputHtmlHelp.js
URL: http://svn.apache.org/viewcvs/myfaces/trunk/src/components/org/apache/myfaces/custom/inputHtmlHelp/resource/inputHtmlHelp.js?rev=190180&view=auto
==============================================================================
--- myfaces/trunk/src/components/org/apache/myfaces/custom/inputHtmlHelp/resource/inputHtmlHelp.js (added)
+++ myfaces/trunk/src/components/org/apache/myfaces/custom/inputHtmlHelp/resource/inputHtmlHelp.js Sat Jun 11 16:04:37 2005
@@ -0,0 +1,14 @@
+function resetHelpValue(helpText, id)
+{
+    var element=document.getElementById(id);
+    if(element.value==helpText)
+    {
+        element.value="";
+    }
+}
+
+function selectText(id)
+{
+    var element=document.getElementById(id);
+    element.select();
+}
\ No newline at end of file

Modified: myfaces/trunk/src/share/org/apache/myfaces/renderkit/html/HtmlRendererUtils.java
URL: http://svn.apache.org/viewcvs/myfaces/trunk/src/share/org/apache/myfaces/renderkit/html/HtmlRendererUtils.java?rev=190180&r1=190179&r2=190180&view=diff
==============================================================================
--- myfaces/trunk/src/share/org/apache/myfaces/renderkit/html/HtmlRendererUtils.java (original)
+++ myfaces/trunk/src/share/org/apache/myfaces/renderkit/html/HtmlRendererUtils.java Sat Jun 11 16:04:37 2005
@@ -39,6 +39,8 @@
 import org.apache.myfaces.renderkit.html.util.HTMLEncoder;
 import org.apache.myfaces.renderkit.html.util.JavascriptUtils;
 import org.apache.myfaces.component.DisplayValueOnlyCapable;
+import org.apache.myfaces.custom.inputHtmlHelp.HtmlInputTextHelp;
+import org.apache.myfaces.custom.inputHtmlHelp.HtmlInputTextHelp;
 
 /**
  * @author Manfred Geiler (latest modification by $Author$)

Added: myfaces/trunk/tlds/entities/html_input_help_attributes.xml
URL: http://svn.apache.org/viewcvs/myfaces/trunk/tlds/entities/html_input_help_attributes.xml?rev=190180&view=auto
==============================================================================
--- myfaces/trunk/tlds/entities/html_input_help_attributes.xml (added)
+++ myfaces/trunk/tlds/entities/html_input_help_attributes.xml Sat Jun 11 16:04:37 2005
@@ -0,0 +1,17 @@
+<!-- Attributes for HtmlInputText with Helptext -->
+        <attribute>
+            <name>helpText</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+        </attribute>
+        <attribute>
+            <name>selectText</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>addResources</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
\ No newline at end of file

Modified: myfaces/trunk/tlds/myfaces_ext.tld
URL: http://svn.apache.org/viewcvs/myfaces/trunk/tlds/myfaces_ext.tld?rev=190180&r1=190179&r2=190180&view=diff
==============================================================================
--- myfaces/trunk/tlds/myfaces_ext.tld (original)
+++ myfaces/trunk/tlds/myfaces_ext.tld Sat Jun 11 16:04:37 2005
@@ -27,6 +27,7 @@
 <!ENTITY html_form_attributes           SYSTEM "entities/html_form_attributes.xml">
 <!ENTITY html_img_attributes            SYSTEM "entities/html_img_attributes.xml">
 <!ENTITY html_input_attributes          SYSTEM "entities/html_input_attributes.xml">
+<!ENTITY html_input_help_attributes     SYSTEM "entities/html_input_help_attributes.xml">
 <!ENTITY html_input_checkbox_attributes SYSTEM "entities/html_input_checkbox_attributes.xml">
 <!ENTITY html_input_radio_attributes    SYSTEM "entities/html_input_radio_attributes.xml">
 <!ENTITY html_label_attributes          SYSTEM "entities/html_label_attributes.xml">
@@ -281,6 +282,18 @@
         &user_role_attributes;
         &ext_forceId_attribute;
         &display_value_only_attributes;
+    </tag>
+
+    <!-- inputTextHelp -->
+    <tag>
+        <name>inputTextHelp</name>
+        <tag-class>org.apache.myfaces.custom.inputHtmlHelp.HtmlInputTextHelpTag</tag-class>
+        <body-content>JSP</body-content>
+        <description>
+            Extends standard inputText by helptext support.
+        </description>
+        &standard_input_text_attributes;
+        &html_input_help_attributes;
     </tag>
 
     <!-- inputTextarea -->

Modified: myfaces/trunk/webapps/examples/WEB-INF/examples-config.xml
URL: http://svn.apache.org/viewcvs/myfaces/trunk/webapps/examples/WEB-INF/examples-config.xml?rev=190180&r1=190179&r2=190180&view=diff
==============================================================================
--- myfaces/trunk/webapps/examples/WEB-INF/examples-config.xml (original)
+++ myfaces/trunk/webapps/examples/WEB-INF/examples-config.xml Sat Jun 11 16:04:37 2005
@@ -328,6 +328,12 @@
             <to-view-id>/inputHtml.jsp</to-view-id>
         </navigation-case>
 
+        <!--TODO-->
+        <navigation-case>
+            <from-outcome>go_inputHtmlHelp</from-outcome>
+            <to-view-id>/inputHtmlHelp.jsp</to-view-id>
+        </navigation-case>
+
         <navigation-case>
             <from-outcome>go_dataList</from-outcome>
             <to-view-id>/dataList.jsp</to-view-id>

Modified: myfaces/trunk/webapps/examples/inc/navigation.jsp
URL: http://svn.apache.org/viewcvs/myfaces/trunk/webapps/examples/inc/navigation.jsp?rev=190180&r1=190179&r2=190180&view=diff
==============================================================================
Binary files - no diff available.

Added: myfaces/trunk/webapps/examples/inputHtmlHelp.jsp
URL: http://svn.apache.org/viewcvs/myfaces/trunk/webapps/examples/inputHtmlHelp.jsp?rev=190180&view=auto
==============================================================================
--- myfaces/trunk/webapps/examples/inputHtmlHelp.jsp (added)
+++ myfaces/trunk/webapps/examples/inputHtmlHelp.jsp Sat Jun 11 16:04:37 2005
@@ -0,0 +1,73 @@
+<%@ page session="false" contentType="text/html;charset=utf-8"%>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://myfaces.apache.org/extensions" prefix="x"%>
+<html>
+
+<%@include file="inc/head.inc" %>
+
+<!--
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+//-->
+
+<body>
+
+<f:view>
+
+    <f:loadBundle basename="org.apache.myfaces.examples.resource.example_messages" var="example_messages"/>
+
+    <x:panelLayout id="page" layout="#{globalOptions.pageLayout}"
+            styleClass="pageLayout"
+            headerClass="pageHeader"
+            navigationClass="pageNavigation"
+            bodyClass="pageBody"
+            footerClass="pageFooter" >
+        <f:facet name="header">
+            <f:subview id="header">
+                <jsp:include page="inc/page_header.jsp" />
+            </f:subview>
+        </f:facet>
+        <f:facet name="navigation">
+            <f:subview id="menu" >
+                <jsp:include page="inc/navigation.jsp" />
+            </f:subview>
+        </f:facet>
+        <f:facet name="body">
+            <h:panelGroup id="body">
+				<h:form>
+					<f:verbatim>
+						<h1>Input Html Help</h1>
+					</f:verbatim>
+                    <x:div/>
+                    <h:outputText value="Reset Helptext:"/>
+                    <x:inputTextHelp value="" id="i1" addResources="true" helpText="Hello World"/>
+                    <x:div/>
+                    <h:outputText value="Select Text:"/>
+                    <x:inputTextHelp value="" id="i2" selectText="true" helpText=""/>
+				</h:form>
+            </h:panelGroup>
+        </f:facet>
+
+        <%@include file="inc/page_footer.jsp" %>
+
+    </x:panelLayout>
+
+</f:view>
+
+</body>
+
+</html>
\ No newline at end of file

Modified: myfaces/trunk/webapps/src/example/org/apache/myfaces/examples/resource/example_messages.properties
URL: http://svn.apache.org/viewcvs/myfaces/trunk/webapps/src/example/org/apache/myfaces/examples/resource/example_messages.properties?rev=190180&r1=190179&r2=190180&view=diff
==============================================================================
--- myfaces/trunk/webapps/src/example/org/apache/myfaces/examples/resource/example_messages.properties (original)
+++ myfaces/trunk/webapps/src/example/org/apache/myfaces/examples/resource/example_messages.properties Sat Jun 11 16:04:37 2005
@@ -35,6 +35,7 @@
 nav_css             = Stylesheet
 nav_newspaperTable  = Newspaper Table
 nav_InputHtml		= Html Editor
+nav_InputHtmlHelp	= Input Help
 nav_forceId         = ForceId
 nav_selectOneCountry= Select a country box