Author: adubovsky
Date: 2008-07-11 11:08:54 -0400 (Fri, 11 Jul 2008)
New Revision: 9534
Modified:
trunk/test-applications/facelets/src/main/java/skinning/Skinning.java
trunk/test-applications/facelets/src/main/webapp/Skinning/Skinning.xhtml
Log:
Change skinning files.
Modified: trunk/test-applications/facelets/src/main/java/skinning/Skinning.java
===================================================================
--- trunk/test-applications/facelets/src/main/java/skinning/Skinning.java 2008-07-11
14:57:42 UTC (rev 9533)
+++ trunk/test-applications/facelets/src/main/java/skinning/Skinning.java 2008-07-11
15:08:54 UTC (rev 9534)
@@ -1,47 +1,44 @@
package skinning;
+import java.util.ArrayList;
+import java.util.EnumMap;
+
+import javax.faces.model.SelectItem;
+
public class Skinning {
- private String selectSkinning;
- private String skinning;
- private String skinningClass;
- private String commandButton;
- private String commandLink;
- private String dataTable;
- private String inputSecret;
- private String inputText;
- private String inputTextarea;
- private String outputLink;
- private String outputText;
- private String panelGrid;
- private String selectBooleanCheckbox;
- private String selectManyCheckbox;
- private String selectManyListBox;
- private String selectManyMenu;
- private String selectOneListbox;
- private String selectOneMenu;
- private String selectOneRadio;
+ private ArrayList<SelectItem> list = new ArrayList<SelectItem>();
+ private ArrayList<SelectItem> enableStyle = new ArrayList<SelectItem>();
+ private ArrayList<SelectItem> disabledStyle = new ArrayList<SelectItem>();
+ private final int MAX_SIZE = 5;
+ private String selectSkinning = "none";
+ private String skinning = "disable";
+ private String skinningClass = "disable";
+ private String commandButton = "rich-button";
+ private String commandLink = "rich-link";
+ private String dataTable = "rich-isindex";
+ private String inputSecret = "inputSecret";
+ private String inputSecretStyleClass = "rich-input";
+ private String inputTextStyleClass = "rich-input";
+ private String inputText = "inputText";
+ private String inputTextarea = "inputTextarea\nRichFaces";
+ private String inputTextareaStyleClass = "rich-textarea";
+ private String outputLink = "rich-link";
+ private String outputText = "rich-link";
+ private String selectBooleanCheckboxStyleClass = "rich-select";
+ private boolean selectBooleanCheckbox1 = true;
+ private boolean selectBooleanCheckbox2 = false;
+ private String selectManyCheckbox = "rich-select";
+ private String selectManyListbox = "rich-select";
+ private String selectManyListBox = "rich-select";
+ private String selectManyMenu = "rich-select";
+ private String selectOneListbox = "rich-select";
+ private String selectOneMenu = "rich-select";
+ private String selectOneRadio = "rich-select";
public Skinning() {
- commandButton = "rich-button";
- commandLink = "rich-link";
- dataTable = "rich-isindex";
- inputSecret = "rich-button";
- inputText = "rich-input";
- inputTextarea = "rich-textarea";
- commandLink = "rich-link";
- outputLink = "rich-link";
- outputText = "rich-legend";
- panelGrid = "rich-fieldset";
- selectBooleanCheckbox = "rich-select";
- selectManyCheckbox = "rich-select";
- selectManyListBox = "rich-select";
- selectManyMenu = "rich-select";
- selectOneListbox = "rich-select";
- selectOneMenu = "rich-select";
- selectOneRadio = "rich-select";
- skinning = "disable";
- skinningClass = "disable";
- selectSkinning = "none";
+ for(int i = 0; i < MAX_SIZE; i++){
+ list.add(new SelectItem("item " + i));
+ }
}
public String getCommandButton() {
@@ -76,12 +73,12 @@
this.inputSecret = inputSecret;
}
- public String getInputText() {
- return inputText;
+ public String getInputTextStyleClass() {
+ return inputTextStyleClass;
}
- public void setInputText(String inputText) {
- this.inputText = inputText;
+ public void setInputTextStyleClass(String inputTextStyleClass) {
+ this.inputTextStyleClass = inputTextStyleClass;
}
public String getInputTextarea() {
@@ -108,22 +105,14 @@
this.outputText = outputText;
}
- public String getPanelGrid() {
- return panelGrid;
+ public String getSelectBooleanCheckboxStyleClass() {
+ return selectBooleanCheckboxStyleClass;
}
- public void setPanelGrid(String panelGrid) {
- this.panelGrid = panelGrid;
+ public void setSelectBooleanCheckboxStyleClass(String selectBooleanCheckboxStyleClass)
{
+ this.selectBooleanCheckboxStyleClass = selectBooleanCheckboxStyleClass;
}
- public String getSelectBooleanCheckbox() {
- return selectBooleanCheckbox;
- }
-
- public void setSelectBooleanCheckbox(String selectBooleanCheckbox) {
- this.selectBooleanCheckbox = selectBooleanCheckbox;
- }
-
public String getSelectManyListBox() {
return selectManyListBox;
}
@@ -208,4 +197,82 @@
}
this.selectSkinning = selectSkinning;
}
+
+ /**
+ * @return the list
+ */
+ public ArrayList<SelectItem> getList() {
+ return list;
+ }
+
+ /**
+ * @param list the list to set
+ */
+ public void setList(ArrayList<SelectItem> list) {
+ this.list = list;
+ }
+
+ public String getInputText() {
+ return inputText;
+ }
+
+ public void setInputText(String inputText) {
+ this.inputText = inputText;
+ }
+
+ public ArrayList<SelectItem> getEnableStyle() {
+ return enableStyle;
+ }
+
+ public void setEnableStyle(ArrayList<SelectItem> enableStyle) {
+ this.enableStyle = enableStyle;
+ }
+
+ public ArrayList<SelectItem> getDisabledStyle() {
+ return disabledStyle;
+ }
+
+ public void setDisabledStyle(ArrayList<SelectItem> disabledStyle) {
+ this.disabledStyle = disabledStyle;
+ }
+
+ public String getInputSecretStyleClass() {
+ return inputSecretStyleClass;
+ }
+
+ public void setInputSecretStyleClass(String inputSecretStyleClass) {
+ this.inputSecretStyleClass = inputSecretStyleClass;
+ }
+
+ public String getInputTextareaStyleClass() {
+ return inputTextareaStyleClass;
+ }
+
+ public void setInputTextareaStyleClass(String inputTextareaStyleClass) {
+ this.inputTextareaStyleClass = inputTextareaStyleClass;
+ }
+
+ public boolean getSelectBooleanCheckbox1() {
+ return selectBooleanCheckbox1;
+ }
+
+ public void setSelectBooleanCheckbox1(boolean selectBooleanCheckbox1) {
+ this.selectBooleanCheckbox1 = selectBooleanCheckbox1;
+ }
+
+ public boolean getSelectBooleanCheckbox2() {
+ return selectBooleanCheckbox2;
+ }
+
+ public void setSelectBooleanCheckbox2(boolean selectBooleanCheckbox2) {
+ this.selectBooleanCheckbox2 = selectBooleanCheckbox2;
+ }
+
+ public String getSelectManyListbox() {
+ return selectManyListbox;
+ }
+
+ public void setSelectManyListbox(String selectManyListbox) {
+ this.selectManyListbox = selectManyListbox;
+ }
}
Modified: trunk/test-applications/facelets/src/main/webapp/Skinning/Skinning.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/Skinning/Skinning.xhtml 2008-07-11
14:57:42 UTC (rev 9533)
+++ trunk/test-applications/facelets/src/main/webapp/Skinning/Skinning.xhtml 2008-07-11
15:08:54 UTC (rev 9534)
@@ -1,116 +1,226 @@
<f:subview
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:rich="http://richfaces.org/rich" id="skinningSubviewID">
- <h:panelGrid columns="2" border="2" >
- <h:outputText value="styleClass"></h:outputText>
- <h:outputText value="components"></h:outputText>
-
- <h:panelGroup>
- <h:outputText value="commandButton "></h:outputText>
- <h:inputText value="#{skinning.commandButton}"
onchange="submit();"></h:inputText>
- </h:panelGroup>
- <h:commandButton value="commandButton"
- styleClass="#{skinning.commandButton}"></h:commandButton>
-
- <h:panelGroup>
- <h:outputText value="commandLink "></h:outputText>
- <h:inputText value="#{skinning.commandLink}"
onchange="submit();"></h:inputText>
- </h:panelGroup>
- <h:commandLink value="commandLink"
- styleClass="#{skinning.commandLink}"></h:commandLink>
-
- <h:panelGroup>
- <h:outputText value="inputSecret "></h:outputText>
- <h:inputText value="#{skinning.inputSecret}"
onchange="submit();"></h:inputText>
- </h:panelGroup>
- <h:inputSecret value="secret"
styleClass="#{skinning.inputSecret}"></h:inputSecret>
-
- <h:panelGroup>
- <h:outputText value="inputText "></h:outputText>
- <h:inputText value="#{skinning.inputText}"
onchange="submit();"></h:inputText>
- </h:panelGroup>
- <h:inputText value="inputText"
styleClass="#{skinning.inputText}"></h:inputText>
-
- <h:panelGroup>
- <h:outputText value="inputTextarea "></h:outputText>
- <h:inputText value="#{skinning.inputTextarea}"
onchange="submit();"></h:inputText>
- </h:panelGroup>
- <h:inputTextarea rows="4" cols="5"
value="inputTextarea"
- styleClass="#{skinning.inputTextarea}"></h:inputTextarea>
-
- <h:panelGroup>
- <h:outputText value="outputLink "></h:outputText>
- <h:inputText value="#{skinning.outputLink}"
onchange="submit();"></h:inputText>
- </h:panelGroup>
- <h:outputLink
styleClass="#{skinning.outputLink}"></h:outputLink>
-
- <h:panelGroup>
- <h:outputText value="outputText "></h:outputText>
- <h:inputText value="#{skinning.outputText}"
onchange="submit();"></h:inputText>
- </h:panelGroup>
- <h:outputText value="outputText"
styleClass="#{skinning.outputText}"></h:outputText>
-
- <h:panelGroup>
- <h:outputText value="panelGrid "></h:outputText>
- <h:inputText value="#{skinning.outputText}"
onchange="submit();"></h:inputText>
- </h:panelGroup>
- <h:panelGrid columns="1"
styleClass="#{skinning.outputText}">
- <h:panelGroup>
- <h:outputText value="panelGrid"></h:outputText>
- </h:panelGroup>
- </h:panelGrid>
-
- <h:panelGroup>
- <h:outputText value="selectBooleanCheckbox "></h:outputText>
- <h:inputText value="#{skinning.selectBooleanCheckbox}"
- onchange="submit();"></h:inputText>
- </h:panelGroup>
- <h:panelGroup>
- <h:selectBooleanCheckbox value="true"
- styleClass="#{skinning.selectBooleanCheckbox}"></h:selectBooleanCheckbox>
- <h:selectBooleanCheckbox value="false"
- styleClass="#{skinning.selectBooleanCheckbox}"></h:selectBooleanCheckbox>
- </h:panelGroup>
-
- <h:panelGroup>
- <h:outputText value="selectManyCheckbox "></h:outputText>
- <h:inputText value="#{skinning.selectManyCheckbox}"
- onchange="submit();"></h:inputText>
- </h:panelGroup>
- <h:selectManyCheckbox styleClass="#{skinning.selectManyCheckbox}">
- <f:selectItems value="#{combobox.selectItem}" />
- </h:selectManyCheckbox>
-
- <h:panelGroup>
- <h:outputText value="selectManyMenu "></h:outputText>
- <h:inputText value="#{skinning.selectManyMenu}"
onchange="submit();"></h:inputText>
- </h:panelGroup>
- <h:selectManyMenu styleClass="#{skinning.selectManyMenu}">
- <f:selectItems value="#{combobox.selectItem}" />
- </h:selectManyMenu>
-
- <h:panelGroup>
- <h:outputText value="selectOneListbox "></h:outputText>
- <h:inputText value="#{skinning.selectOneListbox}"
- onchange="submit();"></h:inputText>
- </h:panelGroup>
- <h:selectOneListbox styleClass="#{skinning.selectOneListbox}">
- <f:selectItems value="#{combobox.selectItem}" />
- </h:selectOneListbox>
-
- <h:panelGroup>
- <h:outputText value="selectOneMenu "></h:outputText>
- <h:inputText value="#{skinning.selectOneMenu}"
onchange="submit();"></h:inputText>
- </h:panelGroup>
- <h:selectOneMenu styleClass="#{skinning.selectOneMenu}">
- <f:selectItems value="#{combobox.selectItem}" />
- </h:selectOneMenu>
-
- <h:panelGroup>
- <h:outputText value="selectOneRadio"></h:outputText>
- <h:inputText value="#{skinning.selectOneRadio}"
onchange="submit();"></h:inputText>
- </h:panelGroup>
- <h:selectOneRadio styleClass="#{skinning.selectOneRadio}">
- <f:selectItems value="#{combobox.selectItem}" />
- </h:selectOneRadio>
-
- </h:panelGrid>
+ <rich:dataTable columns="4" value="">
+ <f:facet name="caption">
+ <h:outputText value="Standard controls skinning feature provides styling for
standard HTML elements so that they become highly compliant with RichFaces look and feel.
Skinning can be applied to all page controls based on element name and type attribute
(where applicable). Also this feature provides a set of CSS styles so that skinning can be
applied by assigning rich-.. classes to particular elements or to container element that
nests controls." />
+ </f:facet>
+ <f:facet name="header">
+ <rich:columnGroup>
+ <rich:column><h:outputText value="Name of Component"
/></rich:column>
+ <rich:column><h:outputText value="styleClass of Component"
/></rich:column>
+ <rich:column><h:outputText value="Component is enabled"
/></rich:column>
+ <rich:column><h:outputText value="Component is disabled"
/></rich:column>
+ </rich:columnGroup>
+ </f:facet>
+ <f:facet name="footer">
+ <h:outputText value="" />
+ </f:facet>
+ <rich:columnGroup>
+ <rich:column>
+ <h:outputText value="inputText" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{skinning.inputTextStyleClass}" />
+ </rich:column>
+ <rich:column>
+ <h:inputText styleClass="#{skinning.inputTextStyleClass}"
value="#{skinning.inputText}" />
+ </rich:column>
+ <rich:column>
+ <h:inputText styleClass="#{skinning.inputTextStyleClass}"
value="#{skinning.inputText}" disabled="true"/>
+ </rich:column>
+ </rich:columnGroup>
+ <rich:columnGroup>
+ <rich:column>
+ <h:outputText value="inputSecret" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{skinning.inputSecretStyleClass}" />
+ </rich:column>
+ <rich:column>
+ <h:inputSecret styleClass="#{skinning.inputSecretStyleClass}"
value="#{skinning.inputSecret}" redisplay="true"/>
+ </rich:column>
+ <rich:column>
+ <h:inputSecret styleClass="#{skinning.inputSecretStyleClass}"
value="#{skinning.inputSecret}" disabled="true"
redisplay="true"/>
+ </rich:column>
+ </rich:columnGroup>
+ <rich:columnGroup>
+ <rich:column>
+ <h:outputText value="inputTextarea" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{skinning.inputTextareaStyleClass}" />
+ </rich:column>
+ <rich:column>
+ <h:inputTextarea styleClass="#{skinning.inputTextareaStyleClass}"
value="#{skinning.inputTextarea}" />
+ </rich:column>
+ <rich:column>
+ <h:inputTextarea styleClass="#{skinning.inputTextareaStyleClass}"
value="#{skinning.inputTextarea}" disabled="true" />
+ </rich:column>
+ </rich:columnGroup>
+ <rich:columnGroup>
+ <rich:column>
+ <h:outputText value="selectBooleanCheckbox" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{skinning.selectBooleanCheckboxStyleClass}" />
+ </rich:column>
+ <rich:column>
+ <h:selectBooleanCheckbox
styleClass="#{skinning.selectBooleanCheckboxStyleClass}"
value="#{skinning.selectBooleanCheckbox1}" />
+ <h:selectBooleanCheckbox
styleClass="#{skinning.selectBooleanCheckboxStyleClass}"
value="#{skinning.selectBooleanCheckbox2}" />
+ </rich:column>
+ <rich:column>
+ <h:selectBooleanCheckbox
styleClass="#{skinning.selectBooleanCheckboxStyleClass}"
value="#{skinning.selectBooleanCheckbox1}" disabled="true"/>
+ <h:selectBooleanCheckbox
styleClass="#{skinning.selectBooleanCheckboxStyleClass}"
value="#{skinning.selectBooleanCheckbox2}" disabled="true" />
+ </rich:column>
+ </rich:columnGroup>
+ <rich:columnGroup>
+ <rich:column>
+ <h:outputText value="selectManyCheckbox" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{skinning.selectManyCheckbox}" />
+ </rich:column>
+ <rich:column>
+ <h:selectManyCheckbox styleClass="#{skinning.selectManyCheckbox}" >
+ <f:selectItems value="#{skinning.list}"/>
+ </h:selectManyCheckbox>
+ </rich:column>
+ <rich:column>
+ <h:selectManyCheckbox styleClass="#{skinning.selectManyCheckbox}"
disabled="true">
+ <f:selectItems value="#{skinning.list}"/>
+ </h:selectManyCheckbox>
+ </rich:column>
+ </rich:columnGroup>
+ <rich:columnGroup>
+ <rich:column>
+ <h:outputText value="selectManyListbox" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{skinning.selectManyListbox}" />
+ </rich:column>
+ <rich:column>
+ <h:selectManyListbox styleClass="#{skinning.selectManyListbox}"
style="height: 55px;" >
+ <f:selectItems value="#{skinning.list}"/>
+ </h:selectManyListbox>
+ </rich:column>
+ <rich:column>
+ <h:selectManyListbox styleClass="#{skinning.selectManyListbox}"
style="height: 55px;" disabled="true">
+ <f:selectItems value="#{skinning.list}"/>
+ </h:selectManyListbox>
+ </rich:column>
+ </rich:columnGroup>
+ <rich:columnGroup>
+ <rich:column>
+ <h:outputText value="selectManyMenu" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{skinning.selectManyMenu}" />
+ </rich:column>
+ <rich:column>
+ <h:selectManyMenu styleClass="#{skinning.selectManyMenu}"
style="height: 55px;" >
+ <f:selectItems value="#{skinning.list}"/>
+ </h:selectManyMenu>
+ </rich:column>
+ <rich:column>
+ <h:selectManyMenu styleClass="#{skinning.selectManyMenu}"
style="height: 55px;" disabled="true">
+ <f:selectItems value="#{skinning.list}"/>
+ </h:selectManyMenu>
+ </rich:column>
+ </rich:columnGroup>
+ <rich:columnGroup>
+ <rich:column>
+ <h:outputText value="selectOneListbox" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{skinning.selectOneListbox}" />
+ </rich:column>
+ <rich:column>
+ <h:selectOneListbox styleClass="#{skinning.selectOneListbox}"
style="height: 55px;" >
+ <f:selectItems value="#{skinning.list}"/>
+ </h:selectOneListbox>
+ </rich:column>
+ <rich:column>
+ <h:selectOneListbox styleClass="#{skinning.selectOneListbox}"
style="height: 55px;" disabled="true">
+ <f:selectItems value="#{skinning.list}"/>
+ </h:selectOneListbox>
+ </rich:column>
+ </rich:columnGroup>
+ <rich:columnGroup>
+ <rich:column>
+ <h:outputText value="selectOneMenu" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{skinning.selectOneMenu}" />
+ </rich:column>
+ <rich:column>
+ <h:selectOneMenu styleClass="#{skinning.selectOneMenu}" >
+ <f:selectItems value="#{skinning.list}"/>
+ </h:selectOneMenu>
+ </rich:column>
+ <rich:column>
+ <h:selectOneMenu styleClass="#{skinning.selectOneMenu}"
disabled="true">
+ <f:selectItems value="#{skinning.list}"/>
+ </h:selectOneMenu>
+ </rich:column>
+ </rich:columnGroup>
+ <rich:columnGroup>
+ <rich:column>
+ <h:outputText value="selectOneRadio" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{skinning.selectOneRadio}" />
+ </rich:column>
+ <rich:column>
+ <h:selectOneRadio styleClass="#{skinning.selectOneRadio}" >
+ <f:selectItems value="#{skinning.list}"/>
+ </h:selectOneRadio>
+ </rich:column>
+ <rich:column>
+ <h:selectOneRadio styleClass="#{skinning.selectOneRadio}"
disabled="true">
+ <f:selectItems value="#{skinning.list}"/>
+ </h:selectOneRadio>
+ </rich:column>
+ </rich:columnGroup>
+ <rich:columnGroup>
+ <rich:column>
+ <h:outputText value="commandButton" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{skinning.commandButton}" />
+ </rich:column>
+ <rich:column>
+ <h:commandButton styleClass="#{skinning.commandButton}"
value="commandButton" />
+ </rich:column>
+ <rich:column>
+ <h:commandButton styleClass="#{skinning.commandButton}"
value="commandButton" disabled="true" />
+ </rich:column>
+ </rich:columnGroup>
+ <rich:columnGroup>
+ <rich:column>
+ <h:outputText value="commandLink" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{skinning.commandLink}" />
+ </rich:column>
+ <rich:column>
+ <h:commandLink styleClass="#{skinning.commandLink}"
value="commandLink" />
+ </rich:column>
+ <rich:column>
+ <h:commandLink styleClass="#{skinning.commandLink}"
value="commandLink" disabled="true" />
+ </rich:column>
+ </rich:columnGroup>
+ <rich:columnGroup>
+ <rich:column>
+ <h:outputText value="outputLink" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{skinning.outputLink}" />
+ </rich:column>
+ <rich:column>
+ <h:outputLink styleClass="#{skinning.outputLink}"><h:outputText
value="outputLink" /></h:outputLink>
+ </rich:column>
+ <rich:column>
+ <h:outputLink styleClass="#{skinning.outputLink}"
disabled="true"><h:outputText value="outputLink"
/></h:outputLink>
+ </rich:column>
+ </rich:columnGroup>
+ </rich:dataTable>
</f:subview>
\ No newline at end of file