Author: ayanul
Date: 2008-03-21 14:50:32 -0400 (Fri, 21 Mar 2008)
New Revision: 7085
Added:
trunk/test-applications/facelets/src/main/java/skinning/
trunk/test-applications/facelets/src/main/java/skinning/Skinning.java
trunk/test-applications/facelets/src/main/webapp/Skinning/
trunk/test-applications/facelets/src/main/webapp/Skinning/Skinning.xhtml
trunk/test-applications/facelets/src/main/webapp/WEB-INF/faces-config-Skinning.xml
Modified:
trunk/test-applications/facelets/src/main/java/rich/RichBean.java
trunk/test-applications/facelets/src/main/webapp/WEB-INF/web.xml
trunk/test-applications/facelets/src/main/webapp/pages/RichMenu/RichMenu.xhtml
Log:
+add skinning
Modified: trunk/test-applications/facelets/src/main/java/rich/RichBean.java
===================================================================
--- trunk/test-applications/facelets/src/main/java/rich/RichBean.java 2008-03-21 18:41:08
UTC (rev 7084)
+++ trunk/test-applications/facelets/src/main/java/rich/RichBean.java 2008-03-21 18:50:32
UTC (rev 7085)
@@ -69,6 +69,7 @@
map.add("FileUpload", add("/FileUpload/FileUpload", new boolean []
{false, false, false}));
map.add("InplaceSelect", add("/InplaceSelect/InplaceSelect", new
boolean [] {false, false, false}));
map.add("InplaceInput", add("/InplaceInput/InplaceInput", new
boolean [] {false, false, false}));
+ map.add("Skinning", add("/Skinning/Skinning", new boolean []
{false, false, false}));
Iterator<String> iterator = map.getSet().iterator();
while(iterator.hasNext()){
list.add(new SelectItem(iterator.next()));
Added: trunk/test-applications/facelets/src/main/java/skinning/Skinning.java
===================================================================
--- trunk/test-applications/facelets/src/main/java/skinning/Skinning.java
(rev 0)
+++ trunk/test-applications/facelets/src/main/java/skinning/Skinning.java 2008-03-21
18:50:32 UTC (rev 7085)
@@ -0,0 +1,211 @@
+package skinning;
+
+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;
+
+ 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";
+ }
+
+ public String getCommandButton() {
+ return commandButton;
+ }
+
+ public void setCommandButton(String commandButton) {
+ this.commandButton = commandButton;
+ }
+
+ public String getCommandLink() {
+ return commandLink;
+ }
+
+ public void setOmmandLink(String commandLink) {
+ this.commandLink = commandLink;
+ }
+
+ public String getDataTable() {
+ return dataTable;
+ }
+
+ public void setDataTable(String dataTable) {
+ this.dataTable = dataTable;
+ }
+
+ public String getInputSecret() {
+ return inputSecret;
+ }
+
+ public void setInputSecret(String inputSecret) {
+ this.inputSecret = inputSecret;
+ }
+
+ public String getInputText() {
+ return inputText;
+ }
+
+ public void setInputText(String inputText) {
+ this.inputText = inputText;
+ }
+
+ public String getInputTextarea() {
+ return inputTextarea;
+ }
+
+ public void setInputTextarea(String inputTextarea) {
+ this.inputTextarea = inputTextarea;
+ }
+
+ public String getOutputLink() {
+ return outputLink;
+ }
+
+ public void setOutputLink(String outputLink) {
+ this.outputLink = outputLink;
+ }
+
+ public String getOutputText() {
+ return outputText;
+ }
+
+ public void setOutputText(String outputText) {
+ this.outputText = outputText;
+ }
+
+ public String getPanelGrid() {
+ return panelGrid;
+ }
+
+ public void setPanelGrid(String panelGrid) {
+ this.panelGrid = panelGrid;
+ }
+
+ public String getSelectBooleanCheckbox() {
+ return selectBooleanCheckbox;
+ }
+
+ public void setSelectBooleanCheckbox(String selectBooleanCheckbox) {
+ this.selectBooleanCheckbox = selectBooleanCheckbox;
+ }
+
+ public String getSelectManyListBox() {
+ return selectManyListBox;
+ }
+
+ public void setSelectManyListBox(String selectManyListBox) {
+ this.selectManyListBox = selectManyListBox;
+ }
+
+ public String getSelectManyMenu() {
+ return selectManyMenu;
+ }
+
+ public void setSelectManyMenu(String selectManyMenu) {
+ this.selectManyMenu = selectManyMenu;
+ }
+
+ public String getSelectOneListbox() {
+ return selectOneListbox;
+ }
+
+ public void setSelectOneListbox(String selectOneListbox) {
+ this.selectOneListbox = selectOneListbox;
+ }
+
+ public String getSelectOneMenu() {
+ return selectOneMenu;
+ }
+
+ public void setSelectOneMenu(String selectOneMenu) {
+ this.selectOneMenu = selectOneMenu;
+ }
+
+ public String getSelectOneRadio() {
+ return selectOneRadio;
+ }
+
+ public void setSelectOneRadio(String selectOneRadio) {
+ this.selectOneRadio = selectOneRadio;
+ }
+
+ public String getSelectManyCheckbox() {
+ return selectManyCheckbox;
+ }
+
+ public void setSelectManyCheckbox(String selectManyCheckbox) {
+ this.selectManyCheckbox = selectManyCheckbox;
+ }
+
+ public void setCommandLink(String commandLink) {
+ this.commandLink = commandLink;
+ }
+
+ public String getSelectSkinning() {
+ return selectSkinning;
+ }
+
+ public String getSkinning() {
+ return skinning;
+ }
+
+ public void setSkinning(String skinning) {
+ this.skinning = skinning;
+ }
+
+ public String getSkinningClass() {
+ return skinningClass;
+ }
+
+ public void setSkinningClass(String skinningClass) {
+ this.skinningClass = skinningClass;
+ }
+
+ public void setSelectSkinning(String selectSkinning) {
+ if (selectSkinning.equals("SKINNING")) {
+ setSkinning("enable");
+ } else if (selectSkinning.equals("SKINNING_CLASSES")) {
+ setSkinning("disable");
+ setSkinningClass("enable");
+ } else {
+ setSkinning("disable");
+ setSkinningClass("disable");
+ }
+ this.selectSkinning = selectSkinning;
+ }
+}
Added: trunk/test-applications/facelets/src/main/webapp/Skinning/Skinning.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/Skinning/Skinning.xhtml
(rev 0)
+++ trunk/test-applications/facelets/src/main/webapp/Skinning/Skinning.xhtml 2008-03-21
18:50:32 UTC (rev 7085)
@@ -0,0 +1,116 @@
+<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>
+</f:subview>
\ No newline at end of file
Added: trunk/test-applications/facelets/src/main/webapp/WEB-INF/faces-config-Skinning.xml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/WEB-INF/faces-config-Skinning.xml
(rev 0)
+++
trunk/test-applications/facelets/src/main/webapp/WEB-INF/faces-config-Skinning.xml 2008-03-21
18:50:32 UTC (rev 7085)
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces
Config 1.0//EN"
+
"http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
+<faces-config>
+ <managed-bean>
+ <managed-bean-name>skinning</managed-bean-name>
+ <managed-bean-class>skinning.Skinning</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+</faces-config>
Modified: trunk/test-applications/facelets/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/WEB-INF/web.xml 2008-03-21 18:41:08
UTC (rev 7084)
+++ trunk/test-applications/facelets/src/main/webapp/WEB-INF/web.xml 2008-03-21 18:50:32
UTC (rev 7085)
@@ -7,7 +7,15 @@
<param-name>org.ajax4jsf.SKIN</param-name>
<param-value>#{skinBean.skin}</param-value>
</context-param>
+ <context-param>
+ <param-name>org.richfaces.CONTROL_SKINNING_CLASSES</param-name>
+ <param-value>#{skinning.skinningClass}</param-value>
+ </context-param>
<context-param>
+ <param-name>org.richfaces.CONTROL_SKINNING</param-name>
+ <param-value>#{skinning.skinning}</param-value>
+ </context-param>
+ <context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.xhtml</param-value>
</context-param>
@@ -33,7 +41,7 @@
</context-param>
<context-param>
<param-name>javax.faces.CONFIG_FILES</param-name>
-
<param-value>/WEB-INF/faces-config-DataTable.xml,/WEB-INF/faces-config-SimpleTogglePanel.xml,/WEB-INF/faces-config-Panel.xml,/WEB-INF/faces-config-PanelBar.xml,/WEB-INF/faces-config-TabPanel.xml,/WEB-INF/faces-config-TogglePanel.xml,/WEB-INF/faces-config-Paint2D.xml,/WEB-INF/faces-config-InputNumberSlider.xml,/WEB-INF/faces-config-InputNumberSpinner.xml,/WEB-INF/faces-config-DDMenu.xml,/WEB-INF/faces-config-Tree.xml,/WEB-INF/faces-config-PanelMenu.xml,/WEB-INF/faces-config-Icon.xml,/WEB-INF/faces-config-ModalPanel.xml,/WEB-INF/faces-config-tooltip.xml,/WEB-INF/faces-config-Skin.xml,/WEB-INF/faces-config-Calendar.xml,/WEB-INF/faces-config-Gmap.xml,/WEB-INF/faces-config-DataFilterSlider.xml,/WEB-INF/faces-config-Separator.xml,/WEB-INF/faces-config-Spacer.xml,/WEB-INF/faces-config-ToolBar.xml,/WEB-INF/faces-config-DataScroller.xml,/WEB-INF/faces-config-SuggestionBox.xml,/WEB-INF/faces-config-Message.xml,/WEB-INF/faces-config-VirtualEarth.xml,/WEB-INF/faces-config-Effect.xml,!
/WEB-INF/faces-config-Insert.xml,/WEB-INF/faces-config-RichBean.xml,/WEB-INF/faces-config-ScrollableDataTable.xml,/WEB-INF/faces-config-jQuery.xml,/WEB-INF/faces-config-DragAndDrop.xml,/WEB-INF/faces-config-OrderingList.xml,/WEB-INF/faces-config-DataOrderedList.xml,/WEB-INF/faces-config-DataDefinitionList.xml,/WEB-INF/faces-config-ContextMenu.xml,/WEB-INF/faces-config-ListShuttle.xml,/WEB-INF/faces-config-Converter.xml,/WEB-INF/faces-config-ComponentControl.xml,/WEB-INF/faces-config-Columns.xml,/WEB-INF/faces-config-PickList.xml,/WEB-INF/faces-config-Combobox.xml,/WEB-INF/faces-config-PTComponent.xml,/WEB-INF/faces-config-Event.xml,/WEB-INF/faces-config-ProgressBar.xml,/WEB-INF/faces-config-Options.xml,/WEB-INF/faces-config-SortingAndFiltering.xml,/WEB-INF/faces-config-Style.xml,/WEB-INF/faces-config-FileUpload.xml,/WEB-INF/faces-config-InplaceSelect.xml,/WEB-INF/faces-config-InplaceInput.xml</param-value>
+
<param-value>/WEB-INF/faces-config-DataTable.xml,/WEB-INF/faces-config-SimpleTogglePanel.xml,/WEB-INF/faces-config-Panel.xml,/WEB-INF/faces-config-PanelBar.xml,/WEB-INF/faces-config-TabPanel.xml,/WEB-INF/faces-config-TogglePanel.xml,/WEB-INF/faces-config-Paint2D.xml,/WEB-INF/faces-config-InputNumberSlider.xml,/WEB-INF/faces-config-InputNumberSpinner.xml,/WEB-INF/faces-config-DDMenu.xml,/WEB-INF/faces-config-Tree.xml,/WEB-INF/faces-config-PanelMenu.xml,/WEB-INF/faces-config-Icon.xml,/WEB-INF/faces-config-ModalPanel.xml,/WEB-INF/faces-config-tooltip.xml,/WEB-INF/faces-config-Skin.xml,/WEB-INF/faces-config-Calendar.xml,/WEB-INF/faces-config-Gmap.xml,/WEB-INF/faces-config-DataFilterSlider.xml,/WEB-INF/faces-config-Separator.xml,/WEB-INF/faces-config-Spacer.xml,/WEB-INF/faces-config-ToolBar.xml,/WEB-INF/faces-config-DataScroller.xml,/WEB-INF/faces-config-SuggestionBox.xml,/WEB-INF/faces-config-Message.xml,/WEB-INF/faces-config-VirtualEarth.xml,/WEB-INF/faces-config-Effect.xml,!
/WEB-INF/faces-config-Insert.xml,/WEB-INF/faces-config-RichBean.xml,/WEB-INF/faces-config-ScrollableDataTable.xml,/WEB-INF/faces-config-jQuery.xml,/WEB-INF/faces-config-DragAndDrop.xml,/WEB-INF/faces-config-OrderingList.xml,/WEB-INF/faces-config-DataOrderedList.xml,/WEB-INF/faces-config-DataDefinitionList.xml,/WEB-INF/faces-config-ContextMenu.xml,/WEB-INF/faces-config-ListShuttle.xml,/WEB-INF/faces-config-Converter.xml,/WEB-INF/faces-config-ComponentControl.xml,/WEB-INF/faces-config-Columns.xml,/WEB-INF/faces-config-PickList.xml,/WEB-INF/faces-config-Combobox.xml,/WEB-INF/faces-config-PTComponent.xml,/WEB-INF/faces-config-Event.xml,/WEB-INF/faces-config-ProgressBar.xml,/WEB-INF/faces-config-Options.xml,/WEB-INF/faces-config-SortingAndFiltering.xml,/WEB-INF/faces-config-Style.xml,/WEB-INF/faces-config-FileUpload.xml,/WEB-INF/faces-config-InplaceSelect.xml,/WEB-INF/faces-config-InplaceInput.xml,/WEB-INF/faces-config-Skinning.xml</param-value>
</context-param>
<context-param>
<param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
Modified: trunk/test-applications/facelets/src/main/webapp/pages/RichMenu/RichMenu.xhtml
===================================================================
---
trunk/test-applications/facelets/src/main/webapp/pages/RichMenu/RichMenu.xhtml 2008-03-21
18:41:08 UTC (rev 7084)
+++
trunk/test-applications/facelets/src/main/webapp/pages/RichMenu/RichMenu.xhtml 2008-03-21
18:50:32 UTC (rev 7085)
@@ -32,6 +32,11 @@
<h:selectOneMenu binding="#{skinBean.component}"
onblur="submit();">
<a4j:support action="#{skinBean.change}" event="onchange"
/>
</h:selectOneMenu>
+ <h:selectOneMenu value="#{skinning.selectSkinning}"
onblur="submit();">
+ <f:selectItem itemLabel="none" itemValue="none"/>
+ <f:selectItem itemLabel="skinning" itemValue="SKINNING"/>
+ <f:selectItem itemLabel="skinningClass"
itemValue="SKINNING_CLASSES"/>
+ </h:selectOneMenu>
</h:panelGrid>
<h:panelGrid columns="1">