title: JSF 2.0: data not updated before the view is rendered
body: <p>In my application, I have the following beans:</p>
  
  <pre><code>@Named(value = "mrBean")
  @SessionScoped
  public class MrBean implements Serializable {
  
      @EJB
      private MrsBean mrsBean;
  
      private Item item;
  
      public void updateItem() {
          this.item = mrsBean.updateItem(item.getId());
      }
  
  }
  
  @Named(value = "itemBean")
  @RequestScoped
  public class itemBean {
      @Inject
      private MrBean mrBean;
  
      @PostConstruct
      public void init() {
          if (FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get("update") != null) mrBean.updateItem();
      }
  }
  </code></pre>
  
  <p>Before showing the item's information on the <code>ViewItem.xhtml</code> page, I will check if the <code>update</code> parameter is submitted to update the item before showing. </p>
  
  <p>When I test the page with the parameter <code>update=true</code>, I have no idea why the old data was rendered instead of the new updated one. In fact, I have to refresh the page before the new data is rendered. </p>
  
  <p>From the above result, I wonder if the <code>@PostConstruct</code> method was called after the view was rendered. </p>
  
  <p>I'd be very grateful if you could give me an advice.</p>
  
  <p>Best regards,</p>