8 Replies Latest reply on Aug 14, 2009 6:16 AM by Nick Belaevski

    Why rich:dataScroller doesn't call

    Victor Hugo Molinar Newbie

      Hello guys.
      I've a project using JSF, Seam and RichFaces for control and view layers.
      And my bad is being the component rich:dataScroller. Because actually when I click on a button from this component, a request is sent to the action and the "set" methods from the ManagedBean attributes are not being called.

      The attributes values that I want to send for my managed bean are:

      <h:selectOneMenu value="#{clogBean.SAno}" style="float:left;">
       <f:selectItems value="#{clogBean.years}"/>
      </h:selectOneMenu>
      
      <h:selectOneMenu value="#{clogBean.SMes}" style="float:left;margin-left:5px;">
       <f:selectItems value="#{clogBean.months}"/>
      </h:selectOneMenu>
      


      Bellow these selectOneMenu components I have an a4j:commandButton and a rich:dataTable that is bind to myDataScroller.

      Ps: all of my components above are inside an a4j:form and an a4j:region.

      So my doubt is:
      Why the rich:dataScroller request doesn't call the set methods of my variables "years" and "months" when I click on a button from this one?

      Here is my action code:
       @Factory("listChangeLog")
       public void loadChangesLog(){
       Calendar initialDate = new GregorianCalendar();
       initialDate.set(Calendar.MONTH, sMes);
       initialDate.set(Calendar.YEAR, sAno);
       initialDate.set(Calendar.DAY_OF_MONTH, 1);
      
       Calendar finalDate = new GregorianCalendar();
       finalDate.set(Calendar.MONTH, sMes);
       finalDate.set(Calendar.YEAR, sAno);
       int lastDay;
       switch (sMes) {
       case 0:
       case 2:
       case 4:
       case 6:
       case 7:
       case 9:
       case 11:
       lastDay = 31;
       break;
       case 1:
       lastDay = (finalDate.get(Calendar.YEAR) % 4 == 0) ? 29 : 28;
       break;
       default:
       lastDay = 30;
       break;
       }
       finalDate.set(Calendar.DAY_OF_MONTH, lastDay);
      
       try{
       listChangeLog = clDao.getChangesByParameter(initialDate, finalDate);
       }catch(HibernateException e){e.printStackTrace();}
       }
      


      and here is my ArrayList declaration:
       @DataModel
       private List<ChangesLog> listChangeLog;
      



      I would appreciate a help.