0

Hi I have to used json to put the list or any data into key value pair for this i used json object .Now please tell me the way of retrieving that json object into jsf view page .I am not able to figure out how to get the json object which contains data in key value pair into the jsf view page here is my code of

jsf BeanManager

import org.json.simple.JSONObject;
class DiaryManager{
    private JSONObject jsonObject;
    public void setView(){
       jsonObject=new  JSONObject();
       jsonObject.put("aptId", diaryViewBean.getApptid());
       jsonObject.put("sessionID", diaryViewBean.getSessionid());
       jsonObject.put("startdate", diaryViewBean.getStartDateBlock());
       jsonObject.put("event", eventobj);
    }
}
henrycharles
  • 1,019
  • 6
  • 28
  • 66
  • Why in the first place you want to mess with JSON if you chose JSF? But if you insist, you can deal with ajax response the usual JavaScript way. – skuntsel Jul 22 '13 at 11:58
  • To which component you want that jason object to render? – Kishor Prakash Jul 22 '13 at 12:05
  • Also, be sure to carefully read BalusC's answer to [How to use Servlets and Ajax?](http://stackoverflow.com/a/4113258/1820286) to gain understanding on how to deal with JSON objects. – skuntsel Jul 22 '13 at 12:36

0 Answers0