5 Replies Latest reply on Jul 23, 2008 2:48 AM by brian young

    Applying Skin Styling to a4j:commandButton?

    Tara Peltier Newbie

      When I access the RichFaces examples, the a4j:commandButtons look great and are styled by the skin that is chosen.

      However, in my application, the skin styles most things but does NOT style the button.

      Based on the reference.pdf and this website (http://www.jboss.org/file-access/default/members/jbossrichfaces/freezone/docs/devguide/en/html/ArchitectureOverview.html#StControlsSkinning)
      I think that only "Basic" skinning is happening, and the button styling I want is part of "Advanced" skinning.

      My problem is I don't know how to enable Advanced skinning in my application.

      We are using JDK 1.5, Tomcat 5.5.x, MyFaces 1.1.5, and RichFaces 3.1.4.GA. Browsers are IE7 and Firefox 2.

      Here's the simple test jsp:
      <%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
      <%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
      <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
      <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>

      <f:view>
      <h:form>
      <rich:panel header="test styles">
      <a4j:commandButton value="Should be styled" />
      </rich:panel>
      </h:form>
      </f:view>


      The rich:panel shows up styled, but the button is plain grey and boring. Any suggestions how to get the buttons to style according to the skin?

      Regards,
      Tara

      Here's the web.xml:
      <?xml version="1.0" encoding="UTF-8"?>
      <web-app xmlns="http://java.sun.com/xml/ns/javaee"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
      http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
      version="2.5">
      <context-param>
      <param-name>org.richfaces.SKIN</param-name>
      <param-value>blueSky</param-value>
      </context-param>
      <context-param>
      <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
      <param-value>server</param-value>
      </context-param>

      <display-name>RichFaces Filter</display-name>
      <filter-name>richfaces</filter-name>
      <filter-class>org.ajax4jsf.Filter</filter-class>

      <filter-mapping>
      <filter-name>richfaces</filter-name>
      <servlet-name>Faces Servlet</servlet-name>
      REQUEST
      FORWARD
      INCLUDE
      </filter-mapping>

      <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>


      <servlet-name>Faces Servlet</servlet-name>
      <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
      <load-on-startup>1</load-on-startup>

      <servlet-mapping>
      <servlet-name>Faces Servlet</servlet-name>
      <url-pattern>*.jsf</url-pattern>
      </servlet-mapping>
      <servlet-mapping>
      <servlet-name>Faces Servlet</servlet-name>
      <url-pattern>/faces/*</url-pattern>
      </servlet-mapping>
      </web-app>