From richfaces-svn-commits at lists.jboss.org Tue Mar 22 01:43:43 2011 Content-Type: multipart/mixed; boundary="===============6443686595703240617==" MIME-Version: 1.0 From: richfaces-svn-commits at lists.jboss.org To: richfaces-svn-commits at lists.jboss.org Subject: [richfaces-svn-commits] JBoss Rich Faces SVN: r22289 - in modules/docs/trunk/Developer_Guide/src/main/docbook/en-US: extras and 1 other directory. Date: Tue, 22 Mar 2011 01:43:43 -0400 Message-ID: <201103220543.p2M5hhIt016599@svn01.web.mwc.hst.phx2.redhat.com> --===============6443686595703240617== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: SeanRogers Date: 2011-03-22 01:43:42 -0400 (Tue, 22 Mar 2011) New Revision: 22289 Added: modules/docs/trunk/Developer_Guide/src/main/docbook/en-US/extras/exam-De= veloper_Guide-Skinning_and_theming-ECSS_style_mappings-0.xml_sample modules/docs/trunk/Developer_Guide/src/main/docbook/en-US/extras/exam-De= veloper_Guide-Skinning_and_theming-ECSS_style_mappings-1.xml_sample modules/docs/trunk/Developer_Guide/src/main/docbook/en-US/extras/exam-De= veloper_Guide-Skinning_and_theming-ECSS_style_mappings.css Removed: modules/docs/trunk/Developer_Guide/src/main/docbook/en-US/extras/exam-De= veloper_Guide-Skinning_and_theming-XCSS_style_mappings-0.xml_sample modules/docs/trunk/Developer_Guide/src/main/docbook/en-US/extras/exam-De= veloper_Guide-Skinning_and_theming-XCSS_style_mappings-1.xml_sample modules/docs/trunk/Developer_Guide/src/main/docbook/en-US/extras/exam-De= veloper_Guide-Skinning_and_theming-XCSS_style_mappings.css Modified: modules/docs/trunk/Developer_Guide/src/main/docbook/en-US/chap-Developer= _Guide-Getting_started_with_RichFaces.xml modules/docs/trunk/Developer_Guide/src/main/docbook/en-US/chap-Developer= _Guide-RichFaces_overview.xml modules/docs/trunk/Developer_Guide/src/main/docbook/en-US/chap-Developer= _Guide-Skinning_and_theming.xml Log: Updated Skinning section of Developer Guide based on review RFPL-1350 Modified: modules/docs/trunk/Developer_Guide/src/main/docbook/en-US/chap-De= veloper_Guide-Getting_started_with_RichFaces.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/docs/trunk/Developer_Guide/src/main/docbook/en-US/chap-Develope= r_Guide-Getting_started_with_RichFaces.xml 2011-03-21 19:11:35 UTC (rev 222= 88) +++ modules/docs/trunk/Developer_Guide/src/main/docbook/en-US/chap-Develope= r_Guide-Getting_started_with_RichFaces.xml 2011-03-22 05:43:42 UTC (rev 222= 89) @@ -215,7 +215,7 @@ The profile then needs to be activated in the <activePro= files> element: <activeProfiles> - <activeProfile>jboss-public-repository</activeProfile> + <activeProfile>jboss-public-repository</activeProfile> </activeProfiles> For further details, refer to the JBoss RichFaces Wiki. Modified: modules/docs/trunk/Developer_Guide/src/main/docbook/en-US/chap-De= veloper_Guide-RichFaces_overview.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/docs/trunk/Developer_Guide/src/main/docbook/en-US/chap-Develope= r_Guide-RichFaces_overview.xml 2011-03-21 19:11:35 UTC (rev 22288) +++ modules/docs/trunk/Developer_Guide/src/main/docbook/en-US/chap-Develope= r_Guide-RichFaces_overview.xml 2011-03-22 05:43:42 UTC (rev 22289) @@ -369,14 +369,12 @@ JBoss RichFaces Downloads area - Download the RichFaces distribution as described in . The distribution bundles contain the full RichFaces source code. Anonymous SVN repository - Alternatively, the source files can be checked out from the anonymo= us SVN repository at http://anonsvn.jboss.org/repos/richfaces/branches/4.0.X/<= /ulink> using the following command: @@ -390,43 +388,12 @@ If using the downloaded distribution, create a new directory named RichFaces, then unzip the archive containing the source = code there. - Compile using <productname>Maven</productname> Modified: modules/docs/trunk/Developer_Guide/src/main/docbook/en-US/chap-De= veloper_Guide-Skinning_and_theming.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/docs/trunk/Developer_Guide/src/main/docbook/en-US/chap-Develope= r_Guide-Skinning_and_theming.xml 2011-03-21 19:11:35 UTC (rev 22288) +++ modules/docs/trunk/Developer_Guide/src/main/docbook/en-US/chap-Develope= r_Guide-Skinning_and_theming.xml 2011-03-22 05:43:42 UTC (rev 22289) @@ -97,65 +97,434 @@ </context-param> = -
- Customizing skins +
+ Skinning overview RichFaces skins are implemented using the following three-level scheme: - A default style class inserted into the framework + Component stylesheets - Style classes contain skin parameters linked to constant theme style= s in the skin. Each component has a class style defining a default represen= tation level. Application interfaces can be modified by altering the values= of skin parameters in the skin itself. + Stylesheets are provided for each component. CSS style parameters ma= p to skin parameters defined in the skin property file. This mapping is acc= omplished through the use of ECSS files. Refer to for details on ECSS files. - A style class extending the skin + Skin property files - A custom style class can be added to the skin, working in conjunctio= n with CSS classes of the same name. All components referencing the class a= re extended in the same way. + Skin property files map skin parameters to constant styles. Skin pro= perties are defined in skin.properties files. Refer to= for a listing of the skin parameters used in a typical skin. - User style class + Custom style classes - Components can use the styleClass attribute to re= define specific component elements. As such, the appearance of an individua= l component can be customized according to a CSS style parameter specified = in the class. + Individual components can use the styleClass attr= ibute to redefine specific elements. These components then use the styles d= efined in a CSS file instead of the standard look for components as defined= by the ECSS stylesheets. - - Simple skinning example + +
+ Skin parameter tables - Using any component, such as a panel, without specifying a st= yleClass will use the default skin parameters for that component. + lists the default values for= the parameter settings in the blueSky skin. These value= s are all listed in the buleSky.skin.properties file, = which can be customized and extended as described in . - = -<rich:panel>This is a = panel without a header</rich:panel> + + Parameter settings for the <literal>blueSky</literal> skin</tit= le> + <tgroup cols=3D"2"> + <thead> + <row> + <entry> + Parameter name + </entry> + <entry> + Default value + </entry> + </row> + </thead> + <tbody> + <row> + <entry><parameter> + headerBackgroundColor + </parameter></entry> + <entry><literal> + #BED6F8 + </literal></entry> + </row> + <row> + <entry><parameter> + headerGradientColor + </parameter></entry> + <entry><literal> + #F2F7FF + </literal></entry> + </row> + <row> + <entry><parameter> + headTextColor + </parameter></entry> + <entry><literal> + #000000 + </literal></entry> + </row> + <row> + <entry><parameter> + headerWeightFont + </parameter></entry> + <entry><literal> + bold + </literal></entry> + </row> + <row> + <entry><parameter> + generalBackgroundColor + </parameter></entry> + <entry><literal> + #FFFFFF + </literal></entry> + </row> + <row> + <entry><parameter> + generalTextColor + </parameter></entry> + <entry><literal> + #000000 + </literal></entry> + </row> + <row> + <entry><parameter> + generalSizeFont + </parameter></entry> + <entry><literal> + 11px + </literal></entry> + </row> + <row> + <entry><parameter> + generalFamilyFont + </parameter></entry> + <entry><literal> + Arial, Verdana, sans-serif + </literal></entry> + </row> + <row> + <entry><parameter> + controlTextColor + </parameter></entry> + <entry><literal> + #000000 + </literal></entry> + </row> + <row> + <entry><parameter> + controlBackgroundColor + </parameter></entry> + <entry><literal> + #ffffff + </literal></entry> + </row> + <row> + <entry><parameter> + additionalBackgroundColor + </parameter></entry> + <entry><literal> + #ECF4FE + </literal></entry> + </row> + <row> + <entry><parameter> + shadowBackgroundColor + </parameter></entry> + <entry><literal> + #000000 + </literal></entry> + </row> + <row> + <entry><parameter> + shadowOpacity + </parameter></entry> + <entry><literal> + 1 + </literal></entry> + </row> + <row> + <entry><parameter> + panelBorderColor + </parameter></entry> + <entry><literal> + #BED6F8 + </literal></entry> + </row> + <row> + <entry><parameter> + subBorderColor + </parameter></entry> + <entry><literal> + #ffffff + </literal></entry> + </row> + <row> + <entry><parameter> + tabBackgroundColor + </parameter></entry> + <entry><literal> + #C6DEFF + </literal></entry> + </row> + <row> + <entry><parameter> + tabDisabledTextColor + </parameter></entry> + <entry><literal> + #8DB7F3 + </literal></entry> + </row> + <row> + <entry><parameter> + trimColor + </parameter></entry> + <entry><literal> + #D6E6FB + </literal></entry> + </row> + <row> + <entry><parameter> + tipBackgroundColor + </parameter></entry> + <entry><literal> + #FAE6B0 + </literal></entry> + </row> + <row> + <entry><parameter> + tipBorderColor + </parameter></entry> + <entry><literal> + #E5973E + </literal></entry> + </row> + <row> + <entry><parameter> + selectControlColor + </parameter></entry> + <entry><literal> + #E79A00 + </literal></entry> + </row> + <row> + <entry><parameter> + generalLinkColor + </parameter></entry> + <entry><literal> + #0078D0 + </literal></entry> + </row> + <row> + <entry><parameter> + hoverLinkColor + </parameter></entry> + <entry><literal> + #0090FF + </literal></entry> + </row> + <row> + <entry><parameter> + visitedLinkColor + </parameter></entry> + <entry><literal> + #0090FF + </literal></entry> + </row> + <row> + <entry><parameter> + headerSizeFont + </parameter></entry> + <entry><literal> + 11px + </literal></entry> + </row> + <row> + <entry><parameter> + headerFamilyFont + </parameter></entry> + <entry><literal> + Arial, Verdana, sans-serif + </literal></entry> + </row> + <row> + <entry><parameter> + tabSizeFont + </parameter></entry> + <entry><literal> + 11px + </literal></entry> + </row> + <row> + <entry><parameter> + tabFamilyFont + </parameter></entry> + <entry><literal> + Arial, Verdana, sans-serif + </literal></entry> + </row> + <row> + <entry><parameter> + buttonSizeFont + </parameter></entry> + <entry><literal> + 11px + </literal></entry> + </row> + <row> + <entry><parameter> + buttonFamilyFont + </parameter></entry> + <entry><literal> + Arial, Verdana, sans-serif + </literal></entry> + </row> + <row> + <entry><parameter> + tableBackgroundColor + </parameter></entry> + <entry><literal> + #FFFFFF + </literal></entry> + </row> + <row> + <entry><parameter> + tableFooterBackgroundColor + </parameter></entry> + <entry><literal> + #cccccc + </literal></entry> + </row> + <row> + <entry><parameter> + tableSubfooterBackgroundColor + </parameter></entry> + <entry><literal> + #f1f1f1 + </literal></entry> + </row> + <row> + <entry><parameter> + tableBorderColor + </parameter></entry> + <entry><literal> + #C0C0C0 + </literal></entry> + </row> + </tbody> + </tgroup> + </table> + </section> + = + <section id=3D"sect-Developer_Guide-Skinning_and_theming-ECSS_files"> + <title><acronym>ECSS</acronym> files - When rendered for display, the panel consists of two HTML elements: a = wrapper <div> element and a <div> element for the body of the panel. The wrapper element for a panel= without a specified styleClass is rendered as follows: + RichFaces uses ECSS files to add extra functionalit= y to the skinning process. ECSS files are CSS files which use Expression La= nguage (EL) to connect styles with skin properties. - - - rf-p and rf-p-b refer to= CSS classes specified in the framework. The CSS classes use skin parameter= s for generic theme styles: - - - + + ECSS style mappings + + The ECSS code for the <rich:panel> component= contains styles for the panel and its body: + + + + + .rf-p defines the panel styles + + + + + The background-color CSS property maps to t= he generalBackgroundColor skin parameter. + + + + + The color CSS property maps to the panelBorderColor skin parameter. + + + + + + + .rf-p-b defines the panel body styles + + + + + The font-family CSS property maps to the generalFamilyFont skin parameter. + + + + + The font-size CSS property maps to the generalSizeFont skin parameter. + + + + + The color CSS property maps to the generalTextColor skin parameter. + + + + + + + + + + +
+ Customizing skins + + Skins in RichFaces can be customized on each of the three levels: + + + + Skin property files - The background-color CSS class attribute is def= ined by the generalBackgroundColor skin parameter. + Application interfaces can be modified by altering the values of ski= n parameters in the skin itself. Edit the constant values defined in the skin.properties file to change the style of every compon= ent mapped to that skin property. + + + Component stylesheets - The color CSS class attribute is defined by the= panelBorderColor skin parameter. + Mappings and other style attributes listed in a component's ECSS fil= e can be edited. Edit the ECSS file to change the styles of all components = of that type. - + + + Custom style classes + + + Individual components can use the styleClass attr= ibute to use a unique style class. Add the new style class to the applicati= on CSS and reference it from an individual component with the styl= eClass attribute. + + + + + = + + Simple skinning example + Using any component, such as a panel, without specifying a st= yleClass will use the default skin parameters for that component. + + = + <rich:panel>This is a= panel without a header</rich:panel> + + When rendered for display, the panel consists of two HTML elements: a = wrapper <div> element and a <div> element for the body of the panel. The wrapper element for a panel= without a specified styleClass is rendered as follows: + + + To customize the panel appearance according to the three-level scheme,= adjust the styles according to the following approach: @@ -177,315 +546,69 @@ The customClass style is added to the CSS, and is= applied to the component when it is rendered for display: -<div class=3D"rf-p custom= Class"> + <div class=3D"rf-p c= ustomClass"> ... </div> = + = +
+ Creating a new skin + + + Create the skin file + The name of the skin file should follow the format new_skin_name.skin.properties and is pl= aced in either the META-INF/skins/ directory or the cl= asspath directory of your project. + + + Define the skin constants + + + Define all the skin constants + Add skin parameter constants and values to the file. All the = skin parameters listed in should = be included in the skin file, with settings relevant to your new skin. + + <filename>blueSky.skin.properties</filename> file + + Open the blueSky.skin.properties file from t= he /META-INF/skins directory in the richfaces= -impl-version.jar package. The file li= sts all the skin parameter constants shown in . + + + You can use the blueSky.skin.properties file= as a template for your new skin. + + + + + Extend a base skin + + Instead of redefining an entire new skin, your skin can use an exi= sting skin as a base on which to build new parameters. Specify a base skin = by using the baseSkin parameter in the skin file, as sho= wn in . + + + Using a base skin + + This example takes the blueSky skin as a base = and only changes the generalSizeFont parameter. + + baseSkin=3DblueSky +generalSizeFont=3D12pt + + + + + + Reference the skin definition + Add a skin definition <context-param> = to the web.xml settings file of your application: + <context-param> + <param-name>org.richfaces.skin</param-name> + <param-value>new_skin_name</param-v= alue> +</context-param> + + +
= -
- Skin parameter tables in RichFaces - - lists the default values for = the parameter settings in the blueSky skin. These values= can be customized and extended for a unique application theme as described= in . - -
- Parameter settings for the <literal>blueSky</literal> skin</titl= e> - <tgroup cols=3D"2"> - <thead> - <row> - <entry> - Parameter name - </entry> - <entry> - Default value - </entry> - </row> - </thead> - <tbody> - <row> - <entry><parameter> - headerBackgroundColor - </parameter></entry> - <entry><literal> - #BED6F8 - </literal></entry> - </row> - <row> - <entry><parameter> - headerGradientColor - </parameter></entry> - <entry><literal> - #F2F7FF - </literal></entry> - </row> - <row> - <entry><parameter> - headTextColor - </parameter></entry> - <entry><literal> - #000000 - </literal></entry> - </row> - <row> - <entry><parameter> - headerWeightFont - </parameter></entry> - <entry><literal> - bold - </literal></entry> - </row> - <row> - <entry><parameter> - generalBackgroundColor - </parameter></entry> - <entry><literal> - #FFFFFF - </literal></entry> - </row> - <row> - <entry><parameter> - generalTextColor - </parameter></entry> - <entry><literal> - #000000 - </literal></entry> - </row> - <row> - <entry><parameter> - generalSizeFont - </parameter></entry> - <entry><literal> - 11px - </literal></entry> - </row> - <row> - <entry><parameter> - generalFamilyFont - </parameter></entry> - <entry><literal> - Arial, Verdana, sans-serif - </literal></entry> - </row> - <row> - <entry><parameter> - controlTextColor - </parameter></entry> - <entry><literal> - #000000 - </literal></entry> - </row> - <row> - <entry><parameter> - controlBackgroundColor - </parameter></entry> - <entry><literal> - #ffffff - </literal></entry> - </row> - <row> - <entry><parameter> - additionalBackgroundColor - </parameter></entry> - <entry><literal> - #ECF4FE - </literal></entry> - </row> - <row> - <entry><parameter> - shadowBackgroundColor - </parameter></entry> - <entry><literal> - #000000 - </literal></entry> - </row> - <row> - <entry><parameter> - shadowOpacity - </parameter></entry> - <entry><literal> - 1 - </literal></entry> - </row> - <row> - <entry><parameter> - panelBorderColor - </parameter></entry> - <entry><literal> - #BED6F8 - </literal></entry> - </row> - <row> - <entry><parameter> - subBorderColor - </parameter></entry> - <entry><literal> - #ffffff - </literal></entry> - </row> - <row> - <entry><parameter> - tabBackgroundColor - </parameter></entry> - <entry><literal> - #C6DEFF - </literal></entry> - </row> - <row> - <entry><parameter> - tabDisabledTextColor - </parameter></entry> - <entry><literal> - #8DB7F3 - </literal></entry> - </row> - <row> - <entry><parameter> - trimColor - </parameter></entry> - <entry><literal> - #D6E6FB - </literal></entry> - </row> - <row> - <entry><parameter> - tipBackgroundColor - </parameter></entry> - <entry><literal> - #FAE6B0 - </literal></entry> - </row> - <row> - <entry><parameter> - tipBorderColor - </parameter></entry> - <entry><literal> - #E5973E - </literal></entry> - </row> - <row> - <entry><parameter> - selectControlColor - </parameter></entry> - <entry><literal> - #E79A00 - </literal></entry> - </row> - <row> - <entry><parameter> - generalLinkColor - </parameter></entry> - <entry><literal> - #0078D0 - </literal></entry> - </row> - <row> - <entry><parameter> - hoverLinkColor - </parameter></entry> - <entry><literal> - #0090FF - </literal></entry> - </row> - <row> - <entry><parameter> - visitedLinkColor - </parameter></entry> - <entry><literal> - #0090FF - </literal></entry> - </row> - <row> - <entry><parameter> - headerSizeFont - </parameter></entry> - <entry><literal> - 11px - </literal></entry> - </row> - <row> - <entry><parameter> - headerFamilyFont - </parameter></entry> - <entry><literal> - Arial, Verdana, sans-serif - </literal></entry> - </row> - <row> - <entry><parameter> - tabSizeFont - </parameter></entry> - <entry><literal> - 11px - </literal></entry> - </row> - <row> - <entry><parameter> - tabFamilyFont - </parameter></entry> - <entry><literal> - Arial, Verdana, sans-serif - </literal></entry> - </row> - <row> - <entry><parameter> - buttonSizeFont - </parameter></entry> - <entry><literal> - 11px - </literal></entry> - </row> - <row> - <entry><parameter> - buttonFamilyFont - </parameter></entry> - <entry><literal> - Arial, Verdana, sans-serif - </literal></entry> - </row> - <row> - <entry><parameter> - tableBackgroundColor - </parameter></entry> - <entry><literal> - #FFFFFF - </literal></entry> - </row> - <row> - <entry><parameter> - tableFooterBackgroundColor - </parameter></entry> - <entry><literal> - #cccccc - </literal></entry> - </row> - <row> - <entry><parameter> - tableSubfooterBackgroundColor - </parameter></entry> - <entry><literal> - #f1f1f1 - </literal></entry> - </row> - <row> - <entry><parameter> - tableBorderColor - </parameter></entry> - <entry><literal> - #C0C0C0 - </literal></entry> - </row> - </tbody> - </tgroup> - </table> - </section> - = <section id=3D"sect-Developer_Guide-Skinning_and_theming-Changing_skins_a= t_runtime"> <title>Changing skins at runtime - The user can change skins at runtime if a managed bean is used to acces= s the skin. + To allow users to change skins at runtime, use a managed bean to access= the skin. @@ -535,560 +658,46 @@ - = -
- Creating a new skin - - - Create the skin file - The name of the skin file should follow the format new_skin_name.skin.properties and is pla= ced in either the META-INF/skins/ directory or the cla= sspath directory of your project. - - - Define skin constants - Add skin parameter constants and values to the file. shows how the skin parameters listed in are included in the skin file. - - <filename>blueSky.skin.properties</filename> file - - The blueSky.skin.properties file lists all the = skin parameter constants for the skin. It can be extracted from the /META-INF/skins directory in the richfaces-impl-version.jar package. - -#Colors -headerBackgroundColor=3D#BED6F8 -headerGradientColor=3D#F2F7FF -headerTextColor=3D#000000 -headerWeightFont=3Dbold - -generalBackgroundColor=3D#FFFFFF -generalTextColor=3D#000000 -generalSizeFont=3D11px -generalFamilyFont=3DArial, Verdana, sans-serif = - -controlTextColor=3D#000000 -controlBackgroundColor=3D#ffffff -additionalBackgroundColor=3D#ECF4FE - -shadowBackgroundColor=3D#000000 -shadowOpacity=3D1 - -panelBorderColor=3D#BED6F8 -subBorderColor=3D#ffffff - -tabBackgroundColor=3D#C6DEFF -tabDisabledTextColor=3D#8DB7F3 - -trimColor=3D#D6E6FB - -tipBackgroundColor=3D#FAE6B0 = -tipBorderColor=3D#E5973E = - -selectControlColor=3D#E79A00 - -generalLinkColor=3D#0078D0 -hoverLinkColor=3D#0090FF -visitedLinkColor=3D#0090FF - -# Fonts -headerSizeFont=3D11px -headerFamilyFont=3DArial, Verdana, sans-serif - -tabSizeFont=3D11 -tabFamilyFont=3DArial, Verdana, sans-serif - -buttonSizeFont=3D11 -buttonFamilyFont=3DArial, Verdana, sans-serif - -tableBackgroundColor=3D#FFFFFF -tableFooterBackgroundColor=3D#cccccc -tableSubfooterBackgroundColor=3D#f1f1f1 -tableBorderColor=3D#C0C0C0 -tableBorderWidth=3D1px - -#Calendar colors -calendarWeekBackgroundColor=3D#F5F5F5 - -calendarHolidaysBackgroundColor=3D#FFEBDA -calendarHolidaysTextColor=3D#FF7800 - -calendarCurrentBackgroundColor=3D#FF7800 -calendarCurrentTextColor=3D#FFEBDA - -calendarSpecBackgroundColor=3D#E4F5E2 -calendarSpecTextColor=3D#000000 - -warningColor=3D#FFE6E6 -warningBackgroundColor=3D#FF0000 - -editorBackgroundColor=3D#F1F1F1 -editBackgroundColor=3D#FEFFDA - -#Gradients -gradientType=3Dplain - - - Alternatively, instead of redefining an entire new skin, your skin ca= n use an existing skin as a base on which to build new parameters. Specify = a base skin by using the baseSkin parameter in the skin = file, as shown in . - - - Using a base skin - - This example takes the blueSky skin as a base and= only changes the generalSizeFont parameter. - -baseSkin=3DblueSky -generalSizeFont=3D12pt - - - - Reference skin definition - Add a skin definition <context-param> t= o the web.xml settings file of your application: -<context-param> - <param-name>org.richfaces.SKIN</param-name> - <param-value>new_skin_name</param-= value> -</context-param> - - -
- =
Skinning standard controls -
- Skinning standard JSF components - - The RichFaces framework can also use skinning to theme JSF (JavaServer= Faces) components in addition to RichFaces components. Follow these additi= onal steps to skin JSF components. - - - - Register a custom render kit - The custom render kit is created by registering it in the faces-config.xml configuration file: -<render-kit> - <render-kit-id>new_skin_name</rend= er-kit-id> - <render-kit-class>org.ajax4jsf.framework.renderer.ChameleonRende= rKitImpl</render-kit-class> -</render-kit> - - - Register custom renderers for the JSF component - Add custom renderers in the faces-config.xml configuration file for each JSF component you want to skin: -<renderer> - <component-family>javax.faces.Command</component-family> - <renderer-type>javax.faces.Link</renderer-type> - <renderer-class>new_skin_name.HtmlCom= mandLinkRenderer</renderer-class> -</renderer> - - - Reference the render kit in the skin file - Add the following to the top of the skin parameters file: render.kit=3Dnew_skin_name - - -
- = -
- Skinning standard HTML controls - - Standard HTML controls and components used alongside RichFaces and JSF= components can also be themed to create a cohesive user interface. The fol= lowing HTML elements accept skinning: - - - - - <a> (including a:hover, = a:visited and other elements) - - - - - <fieldset> - - - - - <hr> - - - - - <input> - - - - - <isindex> - - - - - <keygen> - - - - - <legend> - - - - - <select> - - - - - <textarea> - - - - - Skinning for standard HTML controls can be included in one of two ways: - - - - Automatic skinning - - - The skinning style properties are automatically applied to controls= based on their element names and attribute types. Specify the org= .richfaces.CONTROL_SKINNING context parameter in the we= b.xml configuration file: - - <context-param> - <param-name>org.richfaces.CONTROL_SKINNING</param-name> - <param-value>enable</param-value> - </context-param> - - - - Skinning with CSS classes - - - The skinning style properties are determined through CSS. This meth= od is available by default, but can be disabled through the org.ri= chfaces.CONTROL_SKINNING_CLASSES context parameter in the web.xml configuration file: - - <context-param> - <param-name>org.richfaces.CONTROL_SKINNING_CLASSES</param-name&= gt; - <param-value>disable</param-value> - </context-param> - - When enabled, the parameter offers a predefined CSS class named rich-container. Reference the class from any container-like= component, and the standard HTML controls in the container will be skinned= . Standard HTML controls can also be specifically defined in the CSS; refer= to the org/richfaces/renderkit/html/css/basic_classes.xcss file in the richfaces-ui.jar package for examples = of specially-defined CSS classes with skin parameters for HTML controls. - - - - -
- Skinning levels for standard HTML controls - - There are two levels of skinning for HTML controls, depending on whet= her the browser viewing the application includes rich visual styling capabi= lities, and whether the browser supports features of CSS2 and CSS3. - - Browser lists may need to be updated. - - Basic skinning - - - Apple Safari - - - - - Microsoft Internet Explorer 6 - - - - - Microsoft Internet Explorer 7 in BackCompat mode (refer to compatMode Property at http://msdn.microsoft.com/= en-us/library/ms533687(VS.85).aspx - - - - - Opera - - - - - Extended skinning - - - Microsoft Internet Explorer 7 in standar= ds-compliant mode - - - - - Mozilla Firefox - - - - - If the browser type cannot be identified, the extended level is used.= Set the level explicitly by adding the following context parameter to the = web.xml configuration file, and specifying the <param-value> element as either basic = or extended: - -<context-param> - <param-name>org.richfaces.CONTROL_SKINNING_LEVEL</param-name&= gt; - <param-value>basic</param-value> -</context-param> - -
-
-
- = -
- Defining skins for individual components - RichFaces uses XCSS (XML-formatted CSS) files to add= extra functionality to the skinning process. XCSS files can contain all th= e styling information for each RichFaces component in the library. + Standard HTML controls used alongside RichFaces components are also the= med to create a cohesive user interface. - - XCSS files contain mappings between CSS properties and skin parameters.= The name attribute of the <u:selector> element is the name of the CSS selector. Each <u:style= > element defines a CSS property with the name attribute as its name. Using the skin attribute spec= ifies a skin parameter from the current skin file, while using the value attribute enters the literal value in the CSS file. An exa= mple of this is shown in . - - - XCSS style mappings + +
+ Automatic skinning - The XCSS code for the CSS selector named .rich-component-name= is as follows: + The skinning style properties are automatically applied to controls ba= sed on their element names and attribute types. If the HTML elements are re= ferenced in the standard skin stylesheets, the controls will be styled acco= rding to the mapped skin properties. - - This renders the following CSS code to be read by a standard browser: + Standard HTML controls are skinned in this way by default. To override= this behavior, set the org.richfaces.enableControlSkinning context parameter in the web.xml configuration fil= e to false: - - - CSS selectors with identical skinning properties can be listed in a si= ngle name attribute of a <u:selector> element, separated by commas. - - - - - Style properties can be modified using XML-based XCSS code, or using em= bedded standard CSS code, as shown in - - - Using XCSS code or standard CSS code - - Using XCSS code + <context-param> + <param-name>org.richfaces.enableControlSkinning</param-name> + <param-value>false</param-value> +</context-param> +
+ +
+ Skinning with the <classname>rfs-ctn</classname> class - XCSS code follows an XML structure, using <u:selector>= elements to define style classes and <u:style> elements for each style parameter. + The skinning style properties can be determined through a separate CS= S class. This method is not available by default, but is enabled through th= e org.richfaces.enableControlSkinningClasses context par= ameter in the web.xml configuration file: - - - - Using standard CSS code + <context-param> + <param-name>org.richfaces.enableControlSkinningClasses</param-= name> + <param-value>true</param-value> +</context-param> - CSS code can be included in an XCSS file through the use of a <f:verbatim> element with a character data (CDATA) sectio= n. + When enabled, a stylesheet with predefined classes offers a special C= SS class named rfs-ctn. Reference the rfs= -ctn class from any container element (such as a <d= iv> element) to skin all the standard HTML controls in the con= tainer. - - - -
- = -
- Plug-n-skin - - Plug-n-skin is an alternate method to create, cust= omize, and add a skin. The skin can be based on an existing RichFaces skin,= and can include support for skinning standard HTML controls. - - - - Create a template - Use the Maven build and deployment to= ol to create the skin template by using the following command: -mvn archetype:create -DarchetypeGroupId=3Dorg.richfaces.cdk -Darch= etypeArtifactId=3Dmaven-archetype-plug-n-skin -DarchetypeVersion=3DRF-VERSION -DartifactId=3DARTIFACT-ID -DgroupId=3DGROUP-ID -Dversion=3DVERSION - Use the following parameters for the command: + Standard HTML controls can also be specifically defined in the CSS. R= efer to the /core/impl/src/main/resources/META-INF/resources/skin= ning_both.ecss file in the richfaces-ui.jar p= ackage for examples of specially-defined CSS classes with skin parameters f= or HTML controls. - - - archetypeVersion - - - The version of RichFaces, for example, 4.0.0.GA. - - - - - artifactId - - - The artifact identifier or name of the project. The Maven template= will be created in a directory using this name. - - - - - groupId - - - The group identifier of the project. - - - - - version - - - The version of your project, for example, 1.0. - - - - - - - Add the skin to the CDK - Change to the newly-created directory. Ensure it contains the pom.xml project file, then enter the following command t= o create a new skin and add it to the CDK (Component Dev= elopment Kit): -mvn cdk:add-skin -Dname=3DSKIN-NAME -Dp= ackage=3DSKIN-PACKAGE - - Use the following parameters for the command: - - - - name - - - The name of your new skin. - - - - - package - - - The base package of the skin. By default, the group identifier is = used. - - - - - - Use the following optional keys for advanced features: - - - - baseSkin - - - The skin to use as a base for the new skin. - - - - - createExt - - - Use createExt=3Dtrue to add extended CSS classes for = skinning standard HTML controls. - - - - - - The command creates the following files: - - - - src/main/java/SKIN-PACKAGE/SKIN-NAME/images/BaseImage.java - - - The base class to store images. - - - - - src/test/java/SKIN-PACKAGE/SKIN-NAME/images/BaseImage.java - - - A test version of the base class to store images. - - - - - src/main/resources/SKIN-PACKAGE/SKIN-NAME/css/ - - - The directory that holds the XCSS files that define the themes for= RichFaces components affected by the new skin. - - - If the createExt=3Dtrue parameter was used with the c= ommand, the following XCSS files are included for defining styles for stand= ard HTML controls: - - - - - extended_classes.xcss - - - - - extended.xcss - - - - - - - src/main/resources/SKIN-PACKAGE/SKIN-NAME/css/SKIN-NAME.properties - - - The file that contains the skin properties. - - - - - src/main/resources/META-INF/skins/SKIN-= NAME.xcss - - - A global XCSS file that imports the component-specific XCSS files. - - - If the createExt=3Dtrue parameter was used with the c= ommand, the following skin-name-ext.xc= ss file is included, which imports the XCSS files for standard H= TML controls. - - - - - src/main/config/resources/SKIN-NAME-resources.xml - - - The file that contains the description of all the files listed abo= ve. - - - - - - - Edit XCSS files - - Edit the XCSS files contained in the src/main/resources/MET= A-INF/skins/ directory. Refer to fo= r instructions on how to edit XCSS files. - - - - Build the skin - - After editing the XCSS files, build the skin by running the following= command in the root directory of your skin project (the directory that con= tains the pom.xml file). - -mvn clean install - - - Add the skin to the project configuration - Add the following context parameter to your project's = web.xml configuration file to use the new skin in your applicati= on: -<context-param> - <param-name>org.ajax4jsf.SKIN</param-name> - <param-value>SKIN-NAME</param-valu= e> -</context-param> - - +
+ =
- + = = Copied: modules/docs/trunk/Developer_Guide/src/main/docbook/en-US/extras/ex= am-Developer_Guide-Skinning_and_theming-ECSS_style_mappings-0.xml_sample (f= rom rev 21645, modules/docs/trunk/Developer_Guide/src/main/docbook/en-US/ex= tras/exam-Developer_Guide-Skinning_and_theming-XCSS_style_mappings-0.xml_sa= mple) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/docs/trunk/Developer_Guide/src/main/docbook/en-US/extras/exam-D= eveloper_Guide-Skinning_and_theming-ECSS_style_mappings-0.xml_sample = (rev 0) +++ modules/docs/trunk/Developer_Guide/src/main/docbook/en-US/extras/exam-D= eveloper_Guide-Skinning_and_theming-ECSS_style_mappings-0.xml_sample 2011-0= 3-22 05:43:42 UTC (rev 22289) @@ -0,0 +1,6 @@ + + + + + + Copied: modules/docs/trunk/Developer_Guide/src/main/docbook/en-US/extras/ex= am-Developer_Guide-Skinning_and_theming-ECSS_style_mappings-1.xml_sample (f= rom rev 21645, modules/docs/trunk/Developer_Guide/src/main/docbook/en-US/ex= tras/exam-Developer_Guide-Skinning_and_theming-XCSS_style_mappings-1.xml_sa= mple) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/docs/trunk/Developer_Guide/src/main/docbook/en-US/extras/exam-D= eveloper_Guide-Skinning_and_theming-ECSS_style_mappings-1.xml_sample = (rev 0) +++ modules/docs/trunk/Developer_Guide/src/main/docbook/en-US/extras/exam-D= eveloper_Guide-Skinning_and_theming-ECSS_style_mappings-1.xml_sample 2011-0= 3-22 05:43:42 UTC (rev 22289) @@ -0,0 +1,3 @@ + + + Copied: modules/docs/trunk/Developer_Guide/src/main/docbook/en-US/extras/ex= am-Developer_Guide-Skinning_and_theming-ECSS_style_mappings.css (from rev 2= 1645, modules/docs/trunk/Developer_Guide/src/main/docbook/en-US/extras/exam= -Developer_Guide-Skinning_and_theming-XCSS_style_mappings.css) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/docs/trunk/Developer_Guide/src/main/docbook/en-US/extras/exam-D= eveloper_Guide-Skinning_and_theming-ECSS_style_mappings.css = (rev 0) +++ modules/docs/trunk/Developer_Guide/src/main/docbook/en-US/extras/exam-D= eveloper_Guide-Skinning_and_theming-ECSS_style_mappings.css 2011-03-22 05:4= 3:42 UTC (rev 22289) @@ -0,0 +1,14 @@ +.rf-p{ + background-color:'#{richSkin.generalBackgroundColor}'; + color:'#{richSkin.panelBorderColor}'; + border-width:1px; + border-style:solid; + padding:1px; +} + +.rf-p-b{ + font-size:'#{richSkin.generalSizeFont}'; + color:'#{richSkin.generalTextColor}'; + font-family:'#{richSkin.generalFamilyFont}'; + padding:10px; +} Deleted: modules/docs/trunk/Developer_Guide/src/main/docbook/en-US/extras/e= xam-Developer_Guide-Skinning_and_theming-XCSS_style_mappings-0.xml_sample =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/docs/trunk/Developer_Guide/src/main/docbook/en-US/extras/exam-D= eveloper_Guide-Skinning_and_theming-XCSS_style_mappings-0.xml_sample 2011-0= 3-21 19:11:35 UTC (rev 22288) +++ modules/docs/trunk/Developer_Guide/src/main/docbook/en-US/extras/exam-D= eveloper_Guide-Skinning_and_theming-XCSS_style_mappings-0.xml_sample 2011-0= 3-22 05:43:42 UTC (rev 22289) @@ -1,6 +0,0 @@ - - - - - - Deleted: modules/docs/trunk/Developer_Guide/src/main/docbook/en-US/extras/e= xam-Developer_Guide-Skinning_and_theming-XCSS_style_mappings-1.xml_sample =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/docs/trunk/Developer_Guide/src/main/docbook/en-US/extras/exam-D= eveloper_Guide-Skinning_and_theming-XCSS_style_mappings-1.xml_sample 2011-0= 3-21 19:11:35 UTC (rev 22288) +++ modules/docs/trunk/Developer_Guide/src/main/docbook/en-US/extras/exam-D= eveloper_Guide-Skinning_and_theming-XCSS_style_mappings-1.xml_sample 2011-0= 3-22 05:43:42 UTC (rev 22289) @@ -1,3 +0,0 @@ - - - Deleted: modules/docs/trunk/Developer_Guide/src/main/docbook/en-US/extras/e= xam-Developer_Guide-Skinning_and_theming-XCSS_style_mappings.css =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/docs/trunk/Developer_Guide/src/main/docbook/en-US/extras/exam-D= eveloper_Guide-Skinning_and_theming-XCSS_style_mappings.css 2011-03-21 19:1= 1:35 UTC (rev 22288) +++ modules/docs/trunk/Developer_Guide/src/main/docbook/en-US/extras/exam-D= eveloper_Guide-Skinning_and_theming-XCSS_style_mappings.css 2011-03-22 05:4= 3:42 UTC (rev 22289) @@ -1,6 +0,0 @@ -.rich-component-name { - background-color: additionalBackgroundColor; /*the value of the consta= nt defined by your skin*/ - border-color: tableBorderColor; /*the value of the constant defined by= your skin*/ - border-width: tableBorderWidth; /*the value of the constant defined by= your skin*/ - border-style: solid; -} --===============6443686595703240617==--