3 Replies Latest reply on Mar 15, 2011 8:06 AM by Sebastian Sachtleben

    backing bean is invoked three times

    valerio de minico Newbie
      Hi,
      I'm observing this strange behaviour in my simple app... I have this xhtml fragment in my page:


      "
      <h:dataTable var="_member" value="#{utenteController.utentiList}">
               <h:column>
                  <f:facet name="header">Name</f:facet>
                  #{_member.nome}
               </h:column>
               <h:column>
                  <f:facet name="header">Cognome</f:facet>
                  #{_member.cognome}
               </h:column>
               <h:column>
                  <f:facet name="header">Username</f:facet>
                  #{_member.username}
               </h:column>
      </h:dataTable>
      "

      and this is my backing bean:
      "
      @Named
      public class UtenteController {
           @EJB UtenteService utenteService;
           private final Logger logger = Logger.getLogger(UtenteController.class);
           
           public List<Utente> getUtentiList()
           {
                logger.info("Invoco in Controller");
                return utenteService.retriveUtenteList();
           }
      }
      "

      Looking at log file I observe that the controller is invoked three times... why?

      Thanks,
      Valerio.