0 Replies Latest reply on May 26, 2008 11:41 AM by Zolt Egete

    problem with redering specific skins

    Zolt Egete Newbie

      Hello, I have some problems with several skins which I would like to apply on a certain page.
      I have made a select one menu which holds the skin names

      <h:selectOneMenu styleClass="selectOneMenu"
       value="${skinBean.skin}" style="width:100px" onchange="submit()">
      
       <s:selectItems value="#{skinBean.predefinedSkins}"
       var="result" label="#{result}"
       noSelectionLabel="#{messages['select']}" />
      
      </h:selectOneMenu>


      The bean looks something like this:

      @Stateless
      @Scope(ScopeType.STATELESS)
      @Name("skinBean")
      public class SkinBean implements Skin {
       public final String defaultSkin = "blueSky";
      
       @Out(required=false)
       public String skin = defaultSkin;
      
       public List<String> predefinedSkins = new ArrayList<String>();
      
       /**
       * Default constructors
       */
       public SkinBean() {
       predefinedSkins.add("blueSky");
       predefinedSkins.add("emeraldTown");
       predefinedSkins.add("ruby");
       predefinedSkins.add("wine");
       predefinedSkins.add("plain");
       predefinedSkins.add("japanCherry");
       predefinedSkins.add("classic");
       predefinedSkins.add("deepMarine");
       }
      
       public String getSkin() {
       return skin;
       }
      
       public void setSkin(String skin) {
       if (!RegisterOfficeUtils.isStringDefined(skin)) skin = defaultSkin;
      
       if (skin.equalsIgnoreCase("default")) skin = defaultSkin;
      
       if (skin.equalsIgnoreCase("select")) skin = defaultSkin;
      
       System.out.println("SETTING SKIN TO ["+skin+"]");
      
       this.skin = skin;
       }
      
       public String getDefaultSkin() {
       return defaultSkin;
       }
      
       public List<String> getPredefinedSkins() {
       return predefinedSkins;
       }
      }


      And I have set the web,xml like this:
      <context-param>
       <param-name>org.richfaces.SKIN</param-name>
       <param-value>#{skinBean.skin}</param-value>
      </context-param>


      When I set the blueSky, wine or classic theme the whole page is rendered nicely applying the theme for the whole page, when I select some of the other themes only certain parts of the page shows the new theme style and only certain controls show the new theme style

      What could be the problem here ?