开发者

Provide JSON as data for rich:extendedDataTable

I am implementing a full text search in my project and for that the result of search comes from SOLR server as JSON.

Is it possible to provide JSON for data or value attribute of the richfaces component extendedDatatTable or simple dataTable.

Resultant JSON would look something like :

`resultObj = {

    "numberOfResults":25,
    "results":[
    {
        "instanceId":100,
        "inj_Name":"Inj4",
        "i_IdentificationNumber":127,
        "noz_Name":"Nozzle4",
        "n_IdentificationNumber":460,
        "thr_Name":"Throttleplate4",
        "t_IdentificationNumber":0,
        "act_Name":"Atuator4",
        "a_IdentificationNumber":781
    },
    {
        "instanceId":100,
        "inj_Name":"Inj4",
  开发者_高级运维      "i_IdentificationNumber":127,
        "noz_Name":"Nozzle4",
        "n_IdentificationNumber":460,
        "thr_Name":"Throttleplate4",
        "t_IdentificationNumber":0,
        "act_Name":"Atuator4",
        "a_IdentificationNumber":781
    } ]
};

`

Regards,

Satya


As far as I know, no you can't. Your best bet would be to reflect this data into a List of Java objects using Gson and then use that list as a data source.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜