Makeeditable dropdown doesn't show the data one by one , it shows up comma seperated.

Makeeditable dropdown doesn't show the data one by one , it shows up comma seperated.

imthiyazimthiyaz Posts: 1Questions: 0Answers: 0

Hi I am trying to get make Editable drop down list to populate data from Json list. It works but the issue is it shows comma separated values as one line , instead I want it to show one by one.

controller coding ...
@Autowired(required=false)
private InviteEngagementRepository inviterepo;

@Autowired(required=false)
private Clientrepository clientrep;

@RequestMapping(value = "/clientViewTable")
public @ResponseBody void misclist(HttpServletRequest request,HttpServletResponse response ) throws IOException, JSONException
{
    DateFormat formatter = new SimpleDateFormat("MMM dd yyyy");
    JSONObject jObject=new JSONObject();
    JSONArray array=new JSONArray();
    String id = request.getParameter("engagetid");

    long engid=Long.parseLong(id);
    String username=SecurityContextHolder.getContext().getAuthentication().getName();
    System.out.println("%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%");
    System.out.println("engid"+engid);

    List<InviteEngagement> inviteList=inviterepo.findByEngagementidAndStatusAndUsertype(engid, "Active", "Client");
    if(inviteList.size()>0)
    {
        JSONArray ja=null;
        for(int count=0;inviteList.size()>count;count++)
        {
            InviteEngagement inviteEngagement=(InviteEngagement)inviteList.get(count);
            ja=new JSONArray();
            /*ja.put(inviteEngagement.getId());
            ja.put("<input type='radio' class='assclientid' onclick='inviteEnggList()' id='"+inviteEngagement.getId()+"' name='engagementgroupId' value="+inviteEngagement.getId()+">");
            ja.put(inviteEngagement.getFirstName());*/
            ja.put("EMAIL"+inviteEngagement.getEmailid());
            /*ja.put(inviteEngagement.getLastName());
            ja.put(inviteEngagement.getEmailid());
            ja.put(inviteEngagement.getUsertype());*/

            array.put(ja);
        }
    }
    jObject.put("", array);

    response.getWriter().print(jObject);
    response.setContentType("application/json");
}

Jquery coding ...

}).makeEditable({
"bPaginate": false,
"bLengthChange": true,
"bFilter": false,
"bSort": true,
"bInfo": true,
"bAutoWidth": false,
"sAjaxSource": '${clientViewTableURL}?engagetid='+engagetid,
"fnServerData": function ( sSource,aoData, fnCallback) {
$.ajax({
"dataType": 'json',
"type": "GET",
url : '${clientViewTableURL}?engagetid='+engagetid,
cache:false,
"data":aoData ,
"success": fnCallback

            });
    },
 "aaSorting": [[ 0, "desc" ]],
 "sUpdateHttpMethod": "POST",
  "sUpdateURL": "${planningtestaccURL}",
"aoColumns": [ 
                    {
                indicator: 'Saving...',
                         loadtext: 'loading...',
                         type: 'text',
                          submit   : 'OK',
                            cancel    : 'cancel',

                },

                    {
                indicator: 'Saving...',
                         loadtext: 'loading...',
                         type: 'text',
                          submit   : 'OK',
                            cancel    : 'cancel',

                },
                    null,
                    {
                indicator: 'Saving...',
                         loadtext: 'loading...',
                         type: 'select',
                         submit   : 'OK',
                            cancel    : 'cancel',

                           loadurl:  '${clientViewTableURL}?engagetid='+engagetid,
                                    loadtype: 'GET',



                },
                    null,
                    null,

                {
                        indicator: 'Saving...',
                         loadtext: 'loading...',
                         type: 'select',
                         submit   : 'OK',
                            cancel    : 'cancel',

                        tooltip   : "Double click to change Account Status",
                        data:"{'Canceltask':'Canceltask','Setcomplete':'Setcomplete'}"

                    },

]


});

Can you please suggest where is the issue?

This discussion has been closed.