Author: DavidK Date: 2010-02-17 06:24:45 +0100 (Wed, 17 Feb 2010) New Revision: 1747 Added: trunk/server/webServer2/WebContent/secured/components/inputText2.xhtml Modified: trunk/server/webServer2/WebContent/secured/components/label.xhtml trunk/server/webServer2/WebContent/secured/components/timeSpinnerComponent.xhtml Log: components upgraded Added: trunk/server/webServer2/WebContent/secured/components/inputText2.xhtml =================================================================== --- trunk/server/webServer2/WebContent/secured/components/inputText2.xhtml (rev 0) +++ trunk/server/webServer2/WebContent/secured/components/inputText2.xhtml 2010-02-17 05:24:45 UTC (rev 1747) @@ -0,0 +1,33 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";> +<ui:component xmlns="http://www.w3.org/1999/xhtml"; + xmlns:h="http://java.sun.com/jsf/html"; + xmlns:f="http://java.sun.com/jsf/core"; + xmlns:ui="http://java.sun.com/jsf/facelets"; + xmlns:a4j="http://richfaces.org/a4j"; + xmlns:rich="http://richfaces.org/rich";> + +<!-- CONTRACT +INPUT: + | -id (REQUIRED): + | id of the input + | derived: <id>_input_area, <id>_error + | -value (REQUIRED): + | value binding of the component + | -required : + | tells, whether validate when input is empty + + --> + <h:panelGroup id="#{id}_input_area"> + <!-- input --> + <h:inputText id="#{id}" + value="#{value}" + style="width: 100%;" + required="#{!empty required ? required : false}" + /> + <!-- validation message --> + <a4j:outputPanel ajaxRendered="true"> + <h:message id="#{id}_error" for="#{id}" styleClass="error"/> + </a4j:outputPanel> + </h:panelGroup> + +</ui:component> \ No newline at end of file Modified: trunk/server/webServer2/WebContent/secured/components/label.xhtml =================================================================== --- trunk/server/webServer2/WebContent/secured/components/label.xhtml 2010-02-16 18:33:44 UTC (rev 1746) +++ trunk/server/webServer2/WebContent/secured/components/label.xhtml 2010-02-17 05:24:45 UTC (rev 1747) @@ -6,17 +6,21 @@ xmlns:a4j="http://richfaces.org/a4j"; xmlns:rich="http://richfaces.org/rich";> -<!-- -CONTRACT: -id = "string" -label = "string" | null -tooltip = "string" | null +<!-- CONTRACT +INPUT: + | -id (REQUIRED): + | id of the input field + | derived: <id>_label_area, <id>_label, <id>_image, <id>_tooltip + | -label: + | label of the component + | -tooltip: + | tooltip of the component + | -important: + | shows asterisk(*) before label when important - - -EXTEND POINTS: +EXTEND POINTS (not working?): labelPre labelPost tooltipPre @@ -26,29 +30,30 @@ inputPart --> - <h:panelGroup> + <h:panelGroup id="#{id}_label_area"> <!-- label --> - <ui:insert name="labelPre"/> - <h:outputLabel id="#{id}_label" value="#{label}: " /> - <ui:insert name="labelPost"/> - </h:panelGroup> - <h:panelGroup> + <h:panelGroup> + <ui:insert name="labelPre"/> + <h:outputLabel value="*" rendered="#{important}"/> + <h:outputLabel id="#{id}_label" value="#{label}: " /> + <ui:insert name="labelPost"/> + </h:panelGroup> <!-- tooltip --> - <ui:insert name="tooltipPre"/> - <h:graphicImage id="#{id}_image" - alt="hint" - rendered="#{!empty tooltip}" - url="/images/icons/comments.png" - style="cursor: help;" /> - <rich:toolTip for="#{id}_image" rendered="#{!empty tooltip}"> - <ui:insert name="inTooltipPre"/> - <h:outputLabel id="#{id}_tooltip" value="#{tooltip}" /> - <ui:insert name="inTooltipPost"/> - </rich:toolTip> - <ui:insert name="tooltipPost"/> + <h:panelGroup rendered="#{!empty tooltip}"> + <ui:insert name="tooltipPre"/> + <h:graphicImage id="#{id}_image" + alt="hint" + url="/images/icons/comments.png" + style="cursor: help;" /> + <rich:toolTip for="#{id}_image"> + <ui:insert name="inTooltipPre"/> + <h:outputLabel id="#{id}_tooltip" value="#{tooltip}" /> + <ui:insert name="inTooltipPost"/> + </rich:toolTip> + <ui:insert name="tooltipPost"/> + </h:panelGroup> + <h:panelGroup> + <ui:insert name="inputPart"/> + </h:panelGroup> </h:panelGroup> - <h:panelGroup> - <ui:insert name="inputPart"/> - </h:panelGroup> - </ui:component> \ No newline at end of file Modified: trunk/server/webServer2/WebContent/secured/components/timeSpinnerComponent.xhtml =================================================================== --- trunk/server/webServer2/WebContent/secured/components/timeSpinnerComponent.xhtml 2010-02-16 18:33:44 UTC (rev 1746) +++ trunk/server/webServer2/WebContent/secured/components/timeSpinnerComponent.xhtml 2010-02-17 05:24:45 UTC (rev 1747) @@ -6,7 +6,7 @@ xmlns:a4j="http://richfaces.org/a4j"; xmlns:rich="http://richfaces.org/rich";> -<!-- PROTOCOL +<!-- CONTRACT INPUT: | -id (REQUIRED): | id of the component