Author: ayanul
Date: 2008-05-28 10:43:44 -0400 (Wed, 28 May 2008)
New Revision: 8806
Modified:
trunk/test-applications/jsp/src/main/java/skinning/Skinning.java
trunk/test-applications/jsp/src/main/webapp/Skinning/Skinning.jsp
Log:
Modified: trunk/test-applications/jsp/src/main/java/skinning/Skinning.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/skinning/Skinning.java 2008-05-28 14:33:12
UTC (rev 8805)
+++ trunk/test-applications/jsp/src/main/java/skinning/Skinning.java 2008-05-28 14:43:44
UTC (rev 8806)
@@ -1,47 +1,38 @@
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 = 3;
+ 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 = "rich-button";
+ private String inputText = "rich-input";
+ private String inputTextarea = "rich-textarea";
+ private String outputLink = "rich-link";
+ private String outputText = "rich-link";
+ private String selectBooleanCheckbox = "rich-select";
+ private String selectManyCheckbox = "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() {
@@ -108,14 +99,6 @@
this.outputText = outputText;
}
- public String getPanelGrid() {
- return panelGrid;
- }
-
- public void setPanelGrid(String panelGrid) {
- this.panelGrid = panelGrid;
- }
-
public String getSelectBooleanCheckbox() {
return selectBooleanCheckbox;
}
@@ -208,4 +191,18 @@
}
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;
+ }
}
Modified: trunk/test-applications/jsp/src/main/webapp/Skinning/Skinning.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/Skinning/Skinning.jsp 2008-05-28 14:33:12
UTC (rev 8805)
+++ trunk/test-applications/jsp/src/main/webapp/Skinning/Skinning.jsp 2008-05-28 14:43:44
UTC (rev 8806)
@@ -4,118 +4,108 @@
<%@ taglib
uri="http://richfaces.ajax4jsf.org/rich"
prefix="richfaces"%>
<f:subview id="skinningSubviewID">
- <h:panelGrid columns="2" border="2" >
- <h:outputText value="styleClass"></h:outputText>
- <h:outputText value="components"></h:outputText>
+ <h:panelGrid columns="4">
+ <h:outputText value="componrnts"></h:outputText>
+ <h:outputText value="styleClass components"></h:outputText>
+ <h:outputText value="enable components"></h:outputText>
+ <h:outputText value="disabled components"></h:outputText>
- <h:panelGroup>
- <h:outputText value="commandButton "></h:outputText>
- <h:inputText value="#{skinning.commandButton}"
onchange="submit();"></h:inputText>
- </h:panelGroup>
+ <h:outputText value="commandButton "></h:outputText>
+ <h:inputText value="#{skinning.commandButton}"
onchange="submit();"></h:inputText>
<h:commandButton value="commandButton"
styleClass="#{skinning.commandButton}"></h:commandButton>
+ <h:commandButton value="commandButton" disabled="true"
+ 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:outputText value="commandLink "></h:outputText>
+ <h:inputText value="#{skinning.commandLink}"
onchange="submit();"></h:inputText>
<h:commandLink value="commandLink"
styleClass="#{skinning.commandLink}"></h:commandLink>
+ <h:commandLink value="commandLink" disabled="true"
+ 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:outputText value="inputSecret "></h:outputText>
+ <h:inputText value="#{skinning.inputSecret}"
onchange="submit();"></h:inputText>
<h:inputSecret value="secret"
styleClass="#{skinning.inputSecret}"></h:inputSecret>
+ <h:inputSecret value="secret"
styleClass="#{skinning.inputSecret}"
disabled="true"></h:inputSecret>
- <h:panelGroup>
- <h:outputText value="inputText "></h:outputText>
- <h:inputText value="#{skinning.inputText}"
onchange="submit();"></h:inputText>
- </h:panelGroup>
+ <h:outputText value="inputText "></h:outputText>
+ <h:inputText value="#{skinning.inputText}"
onchange="submit();"></h:inputText>
<h:inputText value="inputText"
styleClass="#{skinning.inputText}"></h:inputText>
+ <h:inputText value="inputText"
styleClass="#{skinning.inputText}"
disabled="true"></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"
+ <h:outputText value="inputTextarea "></h:outputText>
+ <h:inputText value="#{skinning.inputTextarea}"
onchange="submit();"></h:inputText>
+ <h:inputTextarea rows="5" cols="4"
value="inputTextarea" readonly="true"
styleClass="#{skinning.inputTextarea}"></h:inputTextarea>
+ <h:inputTextarea rows="4" cols="5"
value="inputTextarea" disabled="true"
+ 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:outputText value="outputLink "></h:outputText>
+ <h:inputText value="#{skinning.outputLink}"
onchange="submit();"></h:inputText>
<h:outputLink
styleClass="#{skinning.outputLink}"></h:outputLink>
+ <h:outputLink styleClass="#{skinning.outputLink}"
disabled="true"></h:outputLink>
+ <h:outputText value="selectBooleanCheckbox "></h:outputText>
+ <h:inputText value="#{skinning.selectBooleanCheckbox}"
+ onchange="submit();"></h:inputText>
<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:selectBooleanCheckbox value="true"
+ styleClass="#{skinning.selectBooleanCheckbox}"
disabled="true"></h:selectBooleanCheckbox>
+ <h:selectBooleanCheckbox value="false"
+ styleClass="#{skinning.selectBooleanCheckbox}"
disabled="true"></h:selectBooleanCheckbox>
</h:panelGroup>
+
+ <h:outputText value="selectManyCheckbox "></h:outputText>
+ <h:inputText value="#{skinning.selectManyCheckbox}"
+ onchange="submit();"></h:inputText>
<h:selectManyCheckbox styleClass="#{skinning.selectManyCheckbox}">
- <f:selectItems value="#{combobox.selectItem}" />
+ <f:selectItems value="#{skinning.list}" />
</h:selectManyCheckbox>
+ <h:selectManyCheckbox styleClass="#{skinning.selectManyCheckbox}"
disabled="true">
+ <f:selectItems value="#{skinning.list}" />
+ </h:selectManyCheckbox>
- <h:panelGroup>
- <h:outputText value="selectManyMenu "></h:outputText>
- <h:inputText value="#{skinning.selectManyMenu}"
onchange="submit();"></h:inputText>
- </h:panelGroup>
+ <h:outputText value="selectManyMenu "></h:outputText>
+ <h:inputText value="#{skinning.selectManyMenu}"
onchange="submit();"></h:inputText>
+ <h:selectManyMenu styleClass="#{skinning.selectManyMenu}"
disabled="true">
+ <f:selectItems value="#{skinning.list}" />
+ </h:selectManyMenu>
<h:selectManyMenu styleClass="#{skinning.selectManyMenu}">
- <f:selectItems value="#{combobox.selectItem}" />
+ <f:selectItems value="#{skinning.list}" />
</h:selectManyMenu>
- <h:panelGroup>
- <h:outputText value="selectOneListbox "></h:outputText>
- <h:inputText value="#{skinning.selectOneListbox}"
- onchange="submit();"></h:inputText>
- </h:panelGroup>
+ <h:outputText value="selectOneListbox "></h:outputText>
+ <h:inputText value="#{skinning.selectOneListbox}"
onchange="submit();"></h:inputText>
<h:selectOneListbox styleClass="#{skinning.selectOneListbox}">
- <f:selectItems value="#{combobox.selectItem}" />
+ <f:selectItems value="#{skinning.list}" />
</h:selectOneListbox>
+ <h:selectOneListbox styleClass="#{skinning.selectOneListbox}"
disabled="true">
+ <f:selectItems value="#{skinning.list}" />
+ </h:selectOneListbox>
- <h:panelGroup>
- <h:outputText value="selectOneMenu "></h:outputText>
- <h:inputText value="#{skinning.selectOneMenu}"
onchange="submit();"></h:inputText>
- </h:panelGroup>
+ <h:outputText value="selectOneMenu "></h:outputText>
+ <h:inputText value="#{skinning.selectOneMenu}"
onchange="submit();"></h:inputText>
<h:selectOneMenu styleClass="#{skinning.selectOneMenu}">
- <f:selectItems value="#{combobox.selectItem}" />
+ <f:selectItems value="#{skinning.list}" />
</h:selectOneMenu>
+ <h:selectOneMenu styleClass="#{skinning.selectOneMenu}"
disabled="true">
+ <f:selectItems value="#{skinning.list}" />
+ </h:selectOneMenu>
- <h:panelGroup>
- <h:outputText value="selectOneRadio"></h:outputText>
- <h:inputText value="#{skinning.selectOneRadio}"
onchange="submit();"></h:inputText>
- </h:panelGroup>
+ <h:outputText value="selectOneRadio"></h:outputText>
+ <h:inputText value="#{skinning.selectOneRadio}"
onchange="submit();"></h:inputText>
<h:selectOneRadio styleClass="#{skinning.selectOneRadio}">
- <f:selectItems value="#{combobox.selectItem}" />
+ <f:selectItems value="#{skinning.list}" />
</h:selectOneRadio>
-
+ <h:selectOneRadio styleClass="#{skinning.selectOneRadio}"
disabled="true">
+ <f:selectItems value="#{skinning.list}" />
+ </h:selectOneRadio>
</h:panelGrid>
</f:subview>
\ No newline at end of file