2 Replies Latest reply on Dec 7, 2011 8:16 AM by Karsten Wutzke

    JSF 2: f:ajax render="@all" not updating (RF 4 skin switcher)

    Karsten Wutzke Expert

      Hello,

       

      I've formulated my question here in-depth:

       

      http://stackoverflow.com/questions/8411545/jsf-2-page-not-rerendered-on-ajax-request-all-and-explicit-ids

       

      Thought I might drag some RF 4 developers into this...

       

      Does anyone know why nothing happens here?

       

      Thanks

      Karsten

        • 1. Re: JSF 2: f:ajax render="@all" not updating (RF 4 skin switcher)
          Vitaliy Pavlov Novice

          Hi, Karsten

           

          Try this solution:

           

          <h:form style="float: right;">
               
          <h:outputText value="Skin:&#160;" />
               
          <h:selectOneMenu value="#{skinBean.skin}" id="skin-selector">
                 
          <f:ajax event="change" execute="@form" listener="#{skinBean.listener}"
          oncomplete="location.reload();" />
                 
          <f:selectItem itemValue="DEFAULT" itemLabel="Default" />
                 
          <f:selectItem itemValue="classic" itemLabel="Classic" />
                 
          <f:selectItem itemValue="blueSky" itemLabel="Blue Sky" />
                 
          <f:selectItem itemValue="deepMarine" itemLabel="Deep Marine" />
                 
          <f:selectItem itemValue="emeraldTown" itemLabel="Emerald Town" />
                 
          <f:selectItem itemValue="japanCherry" itemLabel="Japan Cherry" />
                 
          <f:selectItem itemValue="ruby" itemLabel="Ruby" />
                 
          <f:selectItem itemValue="wine" itemLabel="Wine" />
               
          </h:selectOneMenu>
             
          </h:form>

          • 2. Re: JSF 2: f:ajax render="@all" not updating (RF 4 skin switcher)
            Karsten Wutzke Expert

            Note, only a4j:ajax has oncomplete. This basically works, but:

             

            Since I'm using @ViewScoped beans all over the place using a full request isn't desired as this recreates new beans when changing skins.

             

            Shouldn't it work as posted? Maybe there's a misunderstanding on my side... maybe it's another JSF 2.0 bug?

             

            Karsten