Duvida RichFaces

Bom dia galera, estou com uma duvida, como eu acesso o css do skin no richfaces?
por exemplo quero usar o css padrao do richfaces para os botoes, eu sei que a classe se chama rich-button , mas não sei como acessar esse css, nao achei onde ele fica localizado para eu fazer o href…alguem sabe ??

Obrigado

Luan Ibarra

bem vindo ao GUJ.
http://livedemo.exadel.com/richfaces-demo/richfaces/dropDownMenu.jsf

cara você pode fazer +ou- assim.

cria um bean.


public class SkinBean {

    private String skin;


    public SkinBean() {
        skin = "classic";
    }
    
    public String getSkin() {
        return skin;
    }

    public void setSkin(String skin) {
        this.skin = skin;
    }

    public String doBlueSky() {
        skin = "blueSky";
        return "";
    }

    public String doClassic() {
        skin = "classic";
        return "";
    }

    public String doRuby() {
        skin = "ruby";
        return "";
    }

    public String doWine() {
        skin = "wine";
        return "";
    }

    public String doDeepMarine() {
        skin = "deepMarine";
        return "";
    }

    public String doEmeraldTown() {
        skin = "emeraldTown";
        return "";
    }

    public String doJapanCherry() {
        skin = "japanCherry";
        return "";
    }

    public String doPlain() {
        skin = "plain";
        return "";
    }

    public String doDefault() {
        skin = "DEFAULT";
        return "";
    }
}

dentro do teu web.xml

<context-param> 
        <param-name>org.richfaces.SKIN</param-name>
        <param-value>#{skinBean.skin}</param-value> 
    </context-param>
    <filter>
        <display-name>RichFaces Filter</display-name>
        <filter-name>richfaces</filter-name>
        <filter-class>org.ajax4jsf.Filter</filter-class>
    </filter>
    <filter-mapping>
            <filter-name>richfaces</filter-name>
            <servlet-name>Faces Servlet</servlet-name>
            <dispatcher>REQUEST</dispatcher>
            <dispatcher>FORWARD</dispatcher>
            <dispatcher>INCLUDE</dispatcher>
        </filter-mapping>

dentro da tua pagina xhtml

<rich:simpleTogglePanel switchType="client" label="Configuração de Skins:" opened="false" >
<rich:dataTable id="tableSkin" title="Alterar Skin do projeto." >
<f:facet name="header">
<rich:columnGroup>
<rich:column>
<h:commandLink id="BlueSky" action="#{skinBean.doBlueSky}" >
<h:outputText value="BlueSky" />
</h:commandLink>
</rich:column>
<rich:column>
<h:commandLink id="Classic" action="#{skinBean.doClassic}" >
<h:outputText value="Classic" />
</h:commandLink>
</rich:column>
<rich:column>
<h:commandLink id="Ruby" action="#{skinBean.doRuby}" >
<h:outputText value="Ruby" />
</h:commandLink>
</rich:column>
<rich:column>
<h:commandLink id="Wine" action="#{skinBean.doWine}" >
<h:outputText value="Wine" />
</h:commandLink>
</rich:column>
<rich:column>
<h:commandLink id="DeepMarine" action="#{skinBean.doDeepMarine}" >
<h:outputText value="DeepMarine" />
</h:commandLink>
</rich:column>
<rich:column>
<h:commandLink id="EmeraldTown" action="#{skinBean.doEmeraldTown}" >
<h:outputText value="EmeraldTown" />
</h:commandLink>
</rich:column>
<rich:column>
<h:commandLink id="JapanCherry" action="#{skinBean.doJapanCherry}" >
<h:outputText value="JapanCherry" />
</h:commandLink>
</rich:column>
<rich:column>
<h:commandLink id="Plain" action="#{skinBean.doPlain}" >
<h:outputText value="Plain" />
</h:commandLink>
</rich:column>
<rich:column>
<h:commandLink id="Default" action="#{skinBean.doDefault}" >
<h:outputText value="Default" />
</h:commandLink>
</rich:column>
</rich:columnGroup>
</f:facet>
</rich:dataTable>
 </rich:simpleTogglePanel>

e dentro do teu faces-config.xml.

 <managed-bean>
		<managed-bean-name>skinBean</managed-bean-name>
		<managed-bean-class>projeto.SkinBean</managed-bean-class>
		<managed-bean-scope>session</managed-bean-scope>
	</managed-bean>

acho que é isso.

T+
abração

Hm entendi Leandro, obrigado ,mais oque eu queria era usar o css que tem pronto no richfaces para os componentes normais do jsf , como por exemplo <h:commandButton> usar o css default do skin do richfaces que eu escolher para o botao…
eu li no site do richfaces que tinha que colocar no web.xml :

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

eu coloquei porem não funcionou :frowning:
Alguem tem alguma ideia?

Muito Obrigado