I am trying to present a JSONObject
in a table in my Facelets file. How can I achieve this?
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;
}
}