4 Replies Latest reply on Aug 22, 2008 5:32 AM by zhou careprad

    the serious design defect of richfaces

    zhou careprad Newbie

      We encounter a serious problem in the project that based on richfaces.
      for example:

      <h:panelGrid id="boxGrid" binding="#{bean.boxGrid}">


      <a4j:commandButton ajaxSingle="true" id="testButton" value="TEST"

      <h:panelGrid style="display:none">
      <a4j:poll id="poll"
      binding="#{pollRequestBean.pollButton}" interval="2000"

      as you see,we want to modify the panelGrid(id="boxGrid") when user click the button(id="testButton"),then when rerender,some changes will show in the content
      of the panelgrid.And,the poll is also what we needed(the reason is affirmative). But this has a big problem--synchronization!
      in such case:a user click a button,richfaces fire the event to it's listener(alias as 'la'),and the listener(la) began to update the boxGrid(the back-binding of the

      panelGrid),in the same time,the poll also come to request,what happen--the new comming request will update the richfaces' component tree,the boxGrid(the back-binding)
      also update,but the listener(la) did not know this,it still hold the old model,this cause the change to the model has no mean to the ui.
      We have try many method to solve this problem,but all is in vain.you may think push,the push alos will update the component tree when the event is fired.
      I think this a serious problem to richfaces.