SlideShare ist ein Scribd-Unternehmen logo
1 von 32
Downloaden Sie, um offline zu lesen
JBoss RichFaces
 Webinar Series
      Skins
    Webinar #4

    Max Katz
  Charley Cowens


    Š Exadel
Webinar Recordings
http://www.exadel.com/web/portal/webinars
Who Is This Guy?
  Senior Systems Engineer
  RIA strategy, development, training
   http://mkblog.exadel.com
   http://twitter.com/maxkatz
Author of                 Co-author of
Practical                 RichFaces
RichFaces                 Dzone
(Apress)                  RefCard
The Plan
Review what we have done so far
Skins – using and extending
Future plans
Questions
RichFaces
1. JSF-AJAX components (100+)
   a4j:* tag library
   rich:* tag library
2. Skins
3. CDK (Component Development Kit)
What You Should Know
Runs in:
 Any servlet container, application
  server
 Portals: JBoss, WebLogic, Liferay
Works with:
 JSF (1.1, 1.2, 2.0soon)
Works with:
 Seam, Spring
Works with any 3rd party components
JBoss Tools
What is Skinnability?
High-level extension to CSS
Not replacement for CSS
Changing a few skin-parameters will modify the
appearance of all components on a page
#Colors                              wine.skin.properties
headerBackgroundColor=#5D7343
headerGradientColor=#9AB37D
headerTextColor=#FFFFFF
headerWeightFont=bold

generalBackgroundColor=#EDEADD
generalTextColor=#000000
generalSizeFont=11px
generalFamilyFont=Arial, Verdana, sans-serif

controlTextColor=#000000
controlBackgroundColor=#ffffff
additionalBackgroundColor=#EEE9D1
shadowBackgroundColor=#000000
shadowOpacity=1
panelBorderColor=#B6AD84
subBorderColor=#EDEADD
tabBackgroundColor=#9AB37D
tabDisabledTextColor=#A49449
...
Out-Of-The-Box Skins

classic                            plain
emeraldTown                        default
blueSky                            laguna*
ruby                               glassX*
wine                               darkX*
deepMarine                         * - (packaged in
sakura                               separate jar file)

Skins are inside richfaces-impl-xxxxx.jar inside the
/META-INF/skins folder
Using Skins
Set current skin in web.xml:
  <context-param>
    <param-name>org.richfaces.SKIN</param-name>
    <param-value>blueSky</param-value>
  </context-param>



   blueSky                     ruby
Changing Skins In Runtime
public class SkinBean {
  private String skin;      In session scope
  // getter, setter
}


<context-param>
  <param-name>org.richfaces.SKIN</param-name>
  <param-value>#{skinBean.skin}</param-value>
</context-param>

<h:selectOneRadio value="#{skinBean.skin}" onclick="submit()">
 <f:selectItem itemLabel="plain" itemValue="plain" />
 <f:selectItem itemLabel="emeraldTown" itemValue="emeraldTown" />
 <f:selectItem itemLabel="blueSky" itemValue="blueSky" />
 ...
</h:selectOneRadio>
Creating Custom Skins
1. Take an existing skin and start
   modifying it (create as many as you
     want)
2. Name the skin <name>.skin.properties
3. Place the skin:
  META-INF/skins
  WEB-INF/classes
                         #Colors
4. Register skin in      headerBackgroundColor=#5D7343
   web.xml file          headerGradientColor=#9AB37D
                         headerTextColor=#FFFFFF
                         headerWeightFont=bold
                         ...
Creating Custom Skins –
 Using Existing Skin As A Base
ruby16.skin.properties
baseSkin=ruby
generalSizeFont=16px
headerSizeFont=16px


<context-param>
  <param-name>org.richfaces.SKIN</param-name>
  <param-value>ruby16</param-value>
</context-param>
Skin Parameters Redefinition
How to find out how skin parameters map into CSS properties? Every
component has a section like this:
Customizing Styles
Four ways:
 1. Any of the default skins
 2. Create custom skins
 3. Skin extension: overwrite skin
      generated styles
 4. Use component defined style
      attributes
Overwriting Skin Generated
 Styles
    <rich:inplaceInput id="drink" value="#{bean.drink}"
                       defaultLabel="enter drink"/>

  Renders:


     Overwriting these CSS classes:
      <style>
       .rich-inplace-view {font-size: x-large;}
       .rich-inplace-field {font-size: x-large;}
       .rich-inplace-changed {font-size: x-large;}
      </style>
                                                          How to
                                                          find these?

        Results in the following:
So, how do you know which
CSS class to overwrite?

Every rich component has
a picture shown on the left

Each picture is followed
by a table (below) describing
Each style class

All styles are available in
RichFaces Developer Guide
Using Component Defined
Style Attributes

 <style>
     .myClass {font-size: x-large}
 </style>
 ...
 <rich:inplaceInput id="drink" value="#{bean.drink}"
                      defaultLabel="enter drink"
                       viewClass="myClass" editClass="myClass"/>
Standard Control Skinning

Using rich components with standard or HTML controls could result
in the following:




             Out of sync button
Standard Control Skinning
One option is to use #{richSkin.<skinParam>} implicit
object:

<h:commandButton action="next"
                  value="Next page -
                    I want to learn about world oceans!"
      style="background-color:#{richSkin.tabBackgroundColor}"/>

All skin parameters are accessible in this fashion
Standard Control Skinning
  Another option is to set this context param. This will skin all standard
  and HTML controls automatically

  <context-param>
    <param-name>org.richfaces.CONTROL_SKINNING</param-name>
    <param-value>enable</param-value>
  </context-param>


The following controls will be skinned:                     Standard:
• input                                                     • IE 6
• select                                                    • IE 7 (BackComp
• textarea                                                  • Mode)
• keygen                                                    • Opera
• isindex                                                   • Safari
• legend                                                    Extended:
• fieldset                                                  • IE7
• hr                                                        • Firefox
• a (together with a:hover, a:visited "pseudo"-elements)    • Chrome
Another alternative is to set this context param:
<context-param>
   <param-name>org.richfaces.CONTROL_SKINNING_CLASSES</param-name>
   <param-value>enable</param-value>
</context-param>

You can now select which standard controls will be skinned
by explicitly using predefined CSS classes.

The available CSS classes are defined in two files located
inside richfaces-ui-X.X.X.jar:
• basic_classes.xcss
• extended_classes.xcss
This means that you have the class .rich-text-general
available to use on a page and it consists of:

 .rich-text-general {
    font-size: generalSizeFont;
    font-family: generalFamilyFont;
    color: generalTextColor;
 }


 Instead of applying a CSS class to each component, .rich-container
 class can be used to skin all standard components inside a
 container <rich:panel>, <h:panelGrid> and <div>:

 <h:panelGrid class="rich-container">
   ...
 </h:panelGrid>

 <div class="rich-container">
   ...
 </div>
RichFaces 3.3.1
Released May 18th, 2009
rich:colorPicker
rich:page
rich:layout, rich:layoutPanel
themes - predefined and packaged
  layouts
rich:page
             header
 subheader
sidebar




             footer    rich:layout, rich:layoutPanel
                               top



                      left      center      right



                               bottom
RichFaces Demo
http://livedemo.exadel.com/richfaces-demo


RichFaces Photo Album
Complete RichFaces-Seam application
Best practices
http://livedemo.exadel.com/photoalbum
RichFaces 4.0
Full integration with JSF 2.0
Will be updated for
 consistency, performance
Release schedule (2009):
 Alpha June
 Beta August
 CR September
 GA October
http://www.jboss.org/community/wiki/RichFace
s40Planning
What We Covered
1.Skins
2.Creating, extending
3.Skinning standard controls
Webinar Recordings
http://www.exadel.com/web/portal/webinars
JSF/RichFaces Training
On-site 1-3 days
More info: http://mkblog.exadel.com
Thank You.
Questions?
mkatz@exadel.com
http://mkblog.exadel.com

Weitere ähnliche Inhalte

Was ist angesagt?

No Coding Necessary: Building Confluence User Macros Cheat Sheet - Atlassian ...
No Coding Necessary: Building Confluence User Macros Cheat Sheet - Atlassian ...No Coding Necessary: Building Confluence User Macros Cheat Sheet - Atlassian ...
No Coding Necessary: Building Confluence User Macros Cheat Sheet - Atlassian ...
Atlassian
 
Firefox Extension Development
Firefox Extension DevelopmentFirefox Extension Development
Firefox Extension Development
phamvanvung
 
Learning to code for startup mvp session 3
Learning to code for startup mvp session 3Learning to code for startup mvp session 3
Learning to code for startup mvp session 3
Henry S
 
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa0602690047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
tutorialsruby
 
Cliw - extension development
Cliw -  extension developmentCliw -  extension development
Cliw - extension development
vicccuu
 
First fare 2011 website 101 for frc teams
First fare 2011 website 101 for frc teamsFirst fare 2011 website 101 for frc teams
First fare 2011 website 101 for frc teams
Oregon FIRST Robotics
 
GR8Conf 2011: GORM Optimization
GR8Conf 2011: GORM OptimizationGR8Conf 2011: GORM Optimization
GR8Conf 2011: GORM Optimization
GR8Conf
 

Was ist angesagt? (17)

Drupal 7 Theme System
Drupal 7 Theme SystemDrupal 7 Theme System
Drupal 7 Theme System
 
No Coding Necessary: Building Confluence User Macros Cheat Sheet - Atlassian ...
No Coding Necessary: Building Confluence User Macros Cheat Sheet - Atlassian ...No Coding Necessary: Building Confluence User Macros Cheat Sheet - Atlassian ...
No Coding Necessary: Building Confluence User Macros Cheat Sheet - Atlassian ...
 
No Coding Necessary: Building User Macros and Dynamic Reports Inside Confluen...
No Coding Necessary: Building User Macros and Dynamic Reports Inside Confluen...No Coding Necessary: Building User Macros and Dynamic Reports Inside Confluen...
No Coding Necessary: Building User Macros and Dynamic Reports Inside Confluen...
 
How To Write Your First Firefox Extension
How To Write Your First Firefox ExtensionHow To Write Your First Firefox Extension
How To Write Your First Firefox Extension
 
Introduction to XMLUI and Mirage Theming for DSpace 3
Introduction to XMLUI and Mirage Theming for DSpace 3Introduction to XMLUI and Mirage Theming for DSpace 3
Introduction to XMLUI and Mirage Theming for DSpace 3
 
Firefox Extension Development
Firefox Extension DevelopmentFirefox Extension Development
Firefox Extension Development
 
Learning to code for startup mvp session 3
Learning to code for startup mvp session 3Learning to code for startup mvp session 3
Learning to code for startup mvp session 3
 
The Way to Theme Enlightenment 2017
The Way to Theme Enlightenment 2017The Way to Theme Enlightenment 2017
The Way to Theme Enlightenment 2017
 
Css
CssCss
Css
 
CustomThesis
CustomThesisCustomThesis
CustomThesis
 
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa0602690047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
 
Service Oriented Integration with ServiceMix
Service Oriented Integration with ServiceMixService Oriented Integration with ServiceMix
Service Oriented Integration with ServiceMix
 
Tricky Migrations
Tricky MigrationsTricky Migrations
Tricky Migrations
 
Cliw - extension development
Cliw -  extension developmentCliw -  extension development
Cliw - extension development
 
First fare 2011 website 101 for frc teams
First fare 2011 website 101 for frc teamsFirst fare 2011 website 101 for frc teams
First fare 2011 website 101 for frc teams
 
GR8Conf 2011: GORM Optimization
GR8Conf 2011: GORM OptimizationGR8Conf 2011: GORM Optimization
GR8Conf 2011: GORM Optimization
 
Managing the User Experience
Managing the User ExperienceManaging the User Experience
Managing the User Experience
 

Andere mochten auch (7)

Ajax Applications with JSF2 and New RichFaces 4 at JAX 2011
Ajax Applications with JSF2 and New RichFaces 4 at JAX 2011Ajax Applications with JSF2 and New RichFaces 4 at JAX 2011
Ajax Applications with JSF2 and New RichFaces 4 at JAX 2011
 
Introduction to RichFaces
Introduction to RichFacesIntroduction to RichFaces
Introduction to RichFaces
 
RichFaces 4 Webinar - New and Advanced Features
RichFaces 4 Webinar - New and Advanced FeaturesRichFaces 4 Webinar - New and Advanced Features
RichFaces 4 Webinar - New and Advanced Features
 
Learn How to Build Mobile Apps Using Cloud Services
Learn How to Build Mobile Apps Using Cloud ServicesLearn How to Build Mobile Apps Using Cloud Services
Learn How to Build Mobile Apps Using Cloud Services
 
RichFaces: more concepts and features
RichFaces: more concepts and featuresRichFaces: more concepts and features
RichFaces: more concepts and features
 
RichFaces 4 webinar #2: RichFaces 3 toRichFaces 4
RichFaces 4 webinar #2: RichFaces 3 toRichFaces 4RichFaces 4 webinar #2: RichFaces 3 toRichFaces 4
RichFaces 4 webinar #2: RichFaces 3 toRichFaces 4
 
Ajax Applications with JSF 2 and New RichFaces 4 - TSSJS
Ajax Applications with JSF 2 and New RichFaces 4 - TSSJSAjax Applications with JSF 2 and New RichFaces 4 - TSSJS
Ajax Applications with JSF 2 and New RichFaces 4 - TSSJS
 

Ähnlich wie RichFaces skins

Using MyBatis in Alfresco custom extensions - Alfresco Devcon 2012 - Berlin
Using MyBatis in Alfresco custom extensions - Alfresco Devcon 2012 - BerlinUsing MyBatis in Alfresco custom extensions - Alfresco Devcon 2012 - Berlin
Using MyBatis in Alfresco custom extensions - Alfresco Devcon 2012 - Berlin
SĂŠbastien Le Marchand
 
Advanced Technology for Web Application Design
Advanced Technology for Web Application DesignAdvanced Technology for Web Application Design
Advanced Technology for Web Application Design
Bryce Kerley
 
RichFaces: rich:* component library
RichFaces: rich:* component libraryRichFaces: rich:* component library
RichFaces: rich:* component library
Max Katz
 

Ähnlich wie RichFaces skins (20)

Symfony2 revealed
Symfony2 revealedSymfony2 revealed
Symfony2 revealed
 
Hyperproductive JSF 2.0 @ JavaOne Brazil 2010
Hyperproductive JSF 2.0 @ JavaOne Brazil 2010Hyperproductive JSF 2.0 @ JavaOne Brazil 2010
Hyperproductive JSF 2.0 @ JavaOne Brazil 2010
 
Spark IT 2011 - Simplified Web Development using Java Server Faces 2.0
Spark IT 2011 - Simplified Web Development using Java Server Faces 2.0Spark IT 2011 - Simplified Web Development using Java Server Faces 2.0
Spark IT 2011 - Simplified Web Development using Java Server Faces 2.0
 
Hibernate java and_oracle
Hibernate java and_oracleHibernate java and_oracle
Hibernate java and_oracle
 
Death of a Themer
Death of a ThemerDeath of a Themer
Death of a Themer
 
JavaServer Faces 2.0 - JavaOne India 2011
JavaServer Faces 2.0 - JavaOne India 2011JavaServer Faces 2.0 - JavaOne India 2011
JavaServer Faces 2.0 - JavaOne India 2011
 
The new static resources framework
The new static resources frameworkThe new static resources framework
The new static resources framework
 
Building Potent WordPress Websites
Building Potent WordPress WebsitesBuilding Potent WordPress Websites
Building Potent WordPress Websites
 
Using MyBatis in Alfresco custom extensions - Alfresco Devcon 2012 - Berlin
Using MyBatis in Alfresco custom extensions - Alfresco Devcon 2012 - BerlinUsing MyBatis in Alfresco custom extensions - Alfresco Devcon 2012 - Berlin
Using MyBatis in Alfresco custom extensions - Alfresco Devcon 2012 - Berlin
 
Assetic (Zendcon)
Assetic (Zendcon)Assetic (Zendcon)
Assetic (Zendcon)
 
Extending eZ Platform v2 with Symfony and React
Extending eZ Platform v2 with Symfony and ReactExtending eZ Platform v2 with Symfony and React
Extending eZ Platform v2 with Symfony and React
 
Sencha Roadshow 2017: Modernizing the Ext JS Class System and Tooling
Sencha Roadshow 2017: Modernizing the Ext JS Class System and ToolingSencha Roadshow 2017: Modernizing the Ext JS Class System and Tooling
Sencha Roadshow 2017: Modernizing the Ext JS Class System and Tooling
 
Advanced Technology for Web Application Design
Advanced Technology for Web Application DesignAdvanced Technology for Web Application Design
Advanced Technology for Web Application Design
 
WebClient Customization.pdf
WebClient Customization.pdfWebClient Customization.pdf
WebClient Customization.pdf
 
RichFaces: rich:* component library
RichFaces: rich:* component libraryRichFaces: rich:* component library
RichFaces: rich:* component library
 
Magento2 Basics for Frontend Development
Magento2 Basics for Frontend DevelopmentMagento2 Basics for Frontend Development
Magento2 Basics for Frontend Development
 
Drupal 8 Cache: Under the hood
Drupal 8 Cache: Under the hoodDrupal 8 Cache: Under the hood
Drupal 8 Cache: Under the hood
 
SenchaCon 2016: Theming the Modern Toolkit - Phil Guerrant
SenchaCon 2016: Theming the Modern Toolkit - Phil Guerrant   SenchaCon 2016: Theming the Modern Toolkit - Phil Guerrant
SenchaCon 2016: Theming the Modern Toolkit - Phil Guerrant
 
BP-6 Repository Customization Best Practices
BP-6 Repository Customization Best PracticesBP-6 Repository Customization Best Practices
BP-6 Repository Customization Best Practices
 
Introducing DynaTrace AJAX Edition
Introducing DynaTrace AJAX EditionIntroducing DynaTrace AJAX Edition
Introducing DynaTrace AJAX Edition
 

Mehr von Max Katz

Mehr von Max Katz (19)

Using cloud tools to build enterprise mobile apps with APIs fast
Using cloud tools to build enterprise mobile apps with APIs fast Using cloud tools to build enterprise mobile apps with APIs fast
Using cloud tools to build enterprise mobile apps with APIs fast
 
Wolters Kluwer Tech. Conference: Disrupting Mobile Development
Wolters Kluwer Tech. Conference: Disrupting Mobile DevelopmentWolters Kluwer Tech. Conference: Disrupting Mobile Development
Wolters Kluwer Tech. Conference: Disrupting Mobile Development
 
Tiggzi at DC jQuery Meetup
Tiggzi at DC jQuery MeetupTiggzi at DC jQuery Meetup
Tiggzi at DC jQuery Meetup
 
What You Need To Build Cool Enterprise Applications With JSF
What You Need To Build Cool Enterprise Applications With JSFWhat You Need To Build Cool Enterprise Applications With JSF
What You Need To Build Cool Enterprise Applications With JSF
 
Tiggr Mobile Apps Builder at Silicon Valley HTML5 Group Meetup
Tiggr Mobile Apps Builder at Silicon Valley HTML5 Group MeetupTiggr Mobile Apps Builder at Silicon Valley HTML5 Group Meetup
Tiggr Mobile Apps Builder at Silicon Valley HTML5 Group Meetup
 
Tiggr - Web-based IDE for Mobile Web And Native Apps
Tiggr - Web-based IDE for Mobile Web And Native AppsTiggr - Web-based IDE for Mobile Web And Native Apps
Tiggr - Web-based IDE for Mobile Web And Native Apps
 
RichFaces 4: Rich Ajax Components For Your JSF Applications
RichFaces 4: Rich Ajax Components For Your JSF ApplicationsRichFaces 4: Rich Ajax Components For Your JSF Applications
RichFaces 4: Rich Ajax Components For Your JSF Applications
 
Building Mobile Apps With jQuery For Any Device In The Cloud
Building Mobile Apps With jQuery For Any Device In The Cloud Building Mobile Apps With jQuery For Any Device In The Cloud
Building Mobile Apps With jQuery For Any Device In The Cloud
 
Ajax Applications with JSF 2 and New RichFaces 4 - JAX/JSF Summit
Ajax Applications with JSF 2 and New RichFaces 4 - JAX/JSF SummitAjax Applications with JSF 2 and New RichFaces 4 - JAX/JSF Summit
Ajax Applications with JSF 2 and New RichFaces 4 - JAX/JSF Summit
 
Mobile Development Choices: Native Apps vs. Web Apps at JAX 2011
Mobile Development Choices: Native Apps vs. Web Apps at JAX 2011Mobile Development Choices: Native Apps vs. Web Apps at JAX 2011
Mobile Development Choices: Native Apps vs. Web Apps at JAX 2011
 
RichFaces 4 webinar #1: Everything You Need To Know
RichFaces 4 webinar #1: Everything You Need To KnowRichFaces 4 webinar #1: Everything You Need To Know
RichFaces 4 webinar #1: Everything You Need To Know
 
Ajax Applications with JSF 2 and New RichFaces 4 - CONFESS 2011
Ajax Applications with JSF 2 and New RichFaces 4 - CONFESS 2011Ajax Applications with JSF 2 and New RichFaces 4 - CONFESS 2011
Ajax Applications with JSF 2 and New RichFaces 4 - CONFESS 2011
 
Devoxx2010 - Mobile Development Choices: Native Apps vs Web Apps
Devoxx2010 - Mobile Development Choices: Native Apps vs Web AppsDevoxx2010 - Mobile Development Choices: Native Apps vs Web Apps
Devoxx2010 - Mobile Development Choices: Native Apps vs Web Apps
 
Hands On With Rich Faces 4 - JavaOne 2010
Hands On With Rich Faces 4 - JavaOne 2010Hands On With Rich Faces 4 - JavaOne 2010
Hands On With Rich Faces 4 - JavaOne 2010
 
Ajax Applications with JSF 2 and new RichFaces 4 - Herbstcampus
Ajax Applications with JSF 2 and new RichFaces 4 - HerbstcampusAjax Applications with JSF 2 and new RichFaces 4 - Herbstcampus
Ajax Applications with JSF 2 and new RichFaces 4 - Herbstcampus
 
Rich Enterprise Applications with JavaFX
Rich Enterprise Applications with JavaFXRich Enterprise Applications with JavaFX
Rich Enterprise Applications with JavaFX
 
Ajax Applications with RichFaces and JSF 2
Ajax Applications with RichFaces and JSF 2Ajax Applications with RichFaces and JSF 2
Ajax Applications with RichFaces and JSF 2
 
Building RIA Applications with JavaFX
Building RIA Applications with JavaFXBuilding RIA Applications with JavaFX
Building RIA Applications with JavaFX
 
Building RIA Applications with RichFaces
Building RIA Applications with RichFacesBuilding RIA Applications with RichFaces
Building RIA Applications with RichFaces
 

KĂźrzlich hochgeladen

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 

KĂźrzlich hochgeladen (20)

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 

RichFaces skins

  • 1. JBoss RichFaces Webinar Series Skins Webinar #4 Max Katz Charley Cowens Š Exadel
  • 3. Who Is This Guy? Senior Systems Engineer RIA strategy, development, training http://mkblog.exadel.com http://twitter.com/maxkatz Author of Co-author of Practical RichFaces RichFaces Dzone (Apress) RefCard
  • 4. The Plan Review what we have done so far Skins – using and extending Future plans Questions
  • 5. RichFaces 1. JSF-AJAX components (100+) a4j:* tag library rich:* tag library 2. Skins 3. CDK (Component Development Kit)
  • 6. What You Should Know Runs in: Any servlet container, application server Portals: JBoss, WebLogic, Liferay Works with: JSF (1.1, 1.2, 2.0soon) Works with: Seam, Spring Works with any 3rd party components
  • 8. What is Skinnability? High-level extension to CSS Not replacement for CSS Changing a few skin-parameters will modify the appearance of all components on a page
  • 9. #Colors wine.skin.properties headerBackgroundColor=#5D7343 headerGradientColor=#9AB37D headerTextColor=#FFFFFF headerWeightFont=bold generalBackgroundColor=#EDEADD generalTextColor=#000000 generalSizeFont=11px generalFamilyFont=Arial, Verdana, sans-serif controlTextColor=#000000 controlBackgroundColor=#ffffff additionalBackgroundColor=#EEE9D1 shadowBackgroundColor=#000000 shadowOpacity=1 panelBorderColor=#B6AD84 subBorderColor=#EDEADD tabBackgroundColor=#9AB37D tabDisabledTextColor=#A49449 ...
  • 10. Out-Of-The-Box Skins classic plain emeraldTown default blueSky laguna* ruby glassX* wine darkX* deepMarine * - (packaged in sakura separate jar file) Skins are inside richfaces-impl-xxxxx.jar inside the /META-INF/skins folder
  • 11. Using Skins Set current skin in web.xml: <context-param> <param-name>org.richfaces.SKIN</param-name> <param-value>blueSky</param-value> </context-param> blueSky ruby
  • 12. Changing Skins In Runtime public class SkinBean { private String skin; In session scope // getter, setter } <context-param> <param-name>org.richfaces.SKIN</param-name> <param-value>#{skinBean.skin}</param-value> </context-param> <h:selectOneRadio value="#{skinBean.skin}" onclick="submit()"> <f:selectItem itemLabel="plain" itemValue="plain" /> <f:selectItem itemLabel="emeraldTown" itemValue="emeraldTown" /> <f:selectItem itemLabel="blueSky" itemValue="blueSky" /> ... </h:selectOneRadio>
  • 13. Creating Custom Skins 1. Take an existing skin and start modifying it (create as many as you want) 2. Name the skin <name>.skin.properties 3. Place the skin: META-INF/skins WEB-INF/classes #Colors 4. Register skin in headerBackgroundColor=#5D7343 web.xml file headerGradientColor=#9AB37D headerTextColor=#FFFFFF headerWeightFont=bold ...
  • 14. Creating Custom Skins – Using Existing Skin As A Base ruby16.skin.properties baseSkin=ruby generalSizeFont=16px headerSizeFont=16px <context-param> <param-name>org.richfaces.SKIN</param-name> <param-value>ruby16</param-value> </context-param>
  • 15. Skin Parameters Redefinition How to find out how skin parameters map into CSS properties? Every component has a section like this:
  • 16. Customizing Styles Four ways: 1. Any of the default skins 2. Create custom skins 3. Skin extension: overwrite skin generated styles 4. Use component defined style attributes
  • 17. Overwriting Skin Generated Styles <rich:inplaceInput id="drink" value="#{bean.drink}" defaultLabel="enter drink"/> Renders: Overwriting these CSS classes: <style> .rich-inplace-view {font-size: x-large;} .rich-inplace-field {font-size: x-large;} .rich-inplace-changed {font-size: x-large;} </style> How to find these? Results in the following:
  • 18. So, how do you know which CSS class to overwrite? Every rich component has a picture shown on the left Each picture is followed by a table (below) describing Each style class All styles are available in RichFaces Developer Guide
  • 19. Using Component Defined Style Attributes <style> .myClass {font-size: x-large} </style> ... <rich:inplaceInput id="drink" value="#{bean.drink}" defaultLabel="enter drink" viewClass="myClass" editClass="myClass"/>
  • 20. Standard Control Skinning Using rich components with standard or HTML controls could result in the following: Out of sync button
  • 21. Standard Control Skinning One option is to use #{richSkin.<skinParam>} implicit object: <h:commandButton action="next" value="Next page - I want to learn about world oceans!" style="background-color:#{richSkin.tabBackgroundColor}"/> All skin parameters are accessible in this fashion
  • 22. Standard Control Skinning Another option is to set this context param. This will skin all standard and HTML controls automatically <context-param> <param-name>org.richfaces.CONTROL_SKINNING</param-name> <param-value>enable</param-value> </context-param> The following controls will be skinned: Standard: • input • IE 6 • select • IE 7 (BackComp • textarea • Mode) • keygen • Opera • isindex • Safari • legend Extended: • fieldset • IE7 • hr • Firefox • a (together with a:hover, a:visited "pseudo"-elements) • Chrome
  • 23. Another alternative is to set this context param: <context-param> <param-name>org.richfaces.CONTROL_SKINNING_CLASSES</param-name> <param-value>enable</param-value> </context-param> You can now select which standard controls will be skinned by explicitly using predefined CSS classes. The available CSS classes are defined in two files located inside richfaces-ui-X.X.X.jar: • basic_classes.xcss • extended_classes.xcss
  • 24. This means that you have the class .rich-text-general available to use on a page and it consists of: .rich-text-general { font-size: generalSizeFont; font-family: generalFamilyFont; color: generalTextColor; } Instead of applying a CSS class to each component, .rich-container class can be used to skin all standard components inside a container <rich:panel>, <h:panelGrid> and <div>: <h:panelGrid class="rich-container"> ... </h:panelGrid> <div class="rich-container"> ... </div>
  • 25. RichFaces 3.3.1 Released May 18th, 2009 rich:colorPicker rich:page rich:layout, rich:layoutPanel themes - predefined and packaged layouts
  • 26. rich:page header subheader sidebar footer rich:layout, rich:layoutPanel top left center right bottom
  • 27. RichFaces Demo http://livedemo.exadel.com/richfaces-demo RichFaces Photo Album Complete RichFaces-Seam application Best practices http://livedemo.exadel.com/photoalbum
  • 28. RichFaces 4.0 Full integration with JSF 2.0 Will be updated for consistency, performance Release schedule (2009): Alpha June Beta August CR September GA October http://www.jboss.org/community/wiki/RichFace s40Planning
  • 29. What We Covered 1.Skins 2.Creating, extending 3.Skinning standard controls
  • 31. JSF/RichFaces Training On-site 1-3 days More info: http://mkblog.exadel.com