2 Replies Latest reply on Dec 26, 2011 10:49 AM by Lu Han

    how to reload/refresh css file after ajax/partial submit when the css is changed

    Lu Han Newbie

      See the below test, when the text named ecssText is updated, the css is not changed.

      I wish a way to refresh the css file, here.


      css file:






      jsf page:


               <h:outputStylesheet name="jsfrf.css" library="css" />





                              <a4j:jsFunction name="elTest" render="ecssText">

                                        <a4j:param name="color" assignTo="#{ecss.color}"/>




                              <h:outputText id="ecssText" value="#{ecss.color}" styleClass="elStyle"/>

                              <a4j:commandButton value="to red" onclick="elTest('red');"/>

                              <a4j:commandButton value="to blue" onclick="elTest('blue');"/>



          @ManagedBean(name = "ecss")


          public class ECSS {

                    private String color;



                    public void init() {

                              this.color = "blue";



                    public String getColor() {

                              return color;



                    public void setColor(String color) {

                              this.color = color;