title: How to present a JSONObject in a JSF page
body: <p>I am trying to present a <code>JSONObject</code> in a table in my Facelets file. How can I achieve this?</p>
  
  <pre><code>package com.myportal.dashboard;
  
  import javax.annotation.PostConstruct;
  import net.sf.json.JSONObject;
  import org.springframework.context.annotation.Scope;
  import org.springframework.stereotype.Component;
  import org.springframework.web.context.WebApplicationContext;
  
  @Component
  @Scope(value=WebApplicationContext.SCOPE_SESSION)
  public class DashboardBacker {
  
      private JSONObject dashboardTable;
  
      @PostConstruct
      public void initializeTable() {
          dashboardTable.put("Completed", 26);
          dashboardTable.put("Failed", 33);
          dashboardTable.put("In Progress", 44);
          dashboardTable.put("On-hold", 9);
      }
  
      public JSONObject getDashboardGraphs() {
          return dashboardGraphs;
      }
  
  }
  </code></pre>