title: ManagedBean functions not being called
body: <p>I am trying to create a basic datatable which fetches the value from database and displays in the table format. However while I try to debug I see that managed bean functions are not being called. Below is the code</p>
  
  <p>list.xhtml:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;h:body&gt;
      &lt;h3&gt;Expense list&lt;/h3&gt;
  
  
      &lt;h:dataTable value="#{userMB.entries}" var="e" styleClass="table"
          headerClass="table-header" rowClasses="table-odd-row,table-even-row"&gt;
  
          &lt;h:column&gt;
              &lt;f:facet name="header"&gt;Date&lt;/f:facet&gt;
              #{e.date}
          &lt;/h:column&gt;     
      &lt;/h:dataTable&gt;
  &lt;/h:body&gt;
  </code></pre>
  
  <p>UserMB.java</p>
  
  <pre><code>@ManagedBean
  @SessionScoped
  public class UserMB {
  
      private List&lt;Entry&gt; entries;
  
      @EJB(mappedName = "entryServices")
      private EntryServices entryServices;
  
      public UserMB() {
  
      }
  
      @PostConstruct
      public void init() {
  
          FacesContext context = FacesContext.getCurrentInstance();
          HttpServletRequest request = (HttpServletRequest) context
                  .getExternalContext().getRequest();
          HttpSession httpSession = request.getSession(false);
          User user = (User) httpSession.getAttribute("user");
          entries = new ArrayList&lt;Entry&gt;();
          entries = entryServices.getEntryByUser(user);
      }
  
      public List&lt;Entry&gt; getEntries() {
          return entries;
      }
  
      public void setEntries(List&lt;Entry&gt; entries) {
          this.entries = entries;
      }
  
      public EntryServices getEntryServices() {
          return entryServices;
      }
  
      public void setEntryServices(
              EntryServices entryServices) {
          this.entryServices = entryServices;
      }
  
  }
  </code></pre>