continuation to select2 edit default value:

continuation to select2 edit default value:

sarath_surisettysarath_surisetty Posts: 54Questions: 13Answers: 0

continuation to

'set' have to be in "opts"?
can i see any example ,below code didnt helped..

               "label": "propertyArea",
               "name": "propertyArea.propertyAreaId",
               "type": "select2",
               "data": "propertyArea.propertyAreaName",
               "set": function (conf, val) {
                   alert("pa out");
               "opts": {
                   "minimumInputLength": 3,
                   "placeholder": 'Property Area',
                   "allowClear": true,
                   "set": function (conf, val) {
                       alert("pa in");
                   ajax: {
                     url: 'propertyArea/json',
                     delay: 250 ,
                     dataType: 'json',
                   //  initialValue:true,

                   data: function (params) {
                       var query = {
                             value: params.term
                         //type: 'public'

                       // Query parameters will be ?search=[term]&type=public
                       return query;
                   processResults: function (data) {
                     return {
                         results: $.map(data, function(obj) {
                             return { id: obj.propertyAreaId, text: obj.propertyAreaName };


  • colincolin Posts: 4,979Questions: 0Answers: 864

    Hi @sarath_surisetty ,

    As Allan said in that thread you linked, it should work. He was asking for a test case so that we can diagnose this. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.



Sign In or Register to comment.