Page 1 of 2

Sending Checkboxgroup in parameter

Posted: Fri Feb 13, 2015 4:29 pm
by Narayan G. Maharjan

Hi,
I have been working on sending the list of checked item in one service request but it seems appery is not sending ajax to that service when i used the checkboxgroup however the radiogroup param are going well. Please help.

Thanks


Sending Checkboxgroup in parameter

Posted: Sat Feb 14, 2015 12:13 am
by Illya Stepanov

Hi -

Could you please show what AJAX request you are trying to send?


Sending Checkboxgroup in parameter

Posted: Mon Feb 16, 2015 11:00 am
by Narayan G. Maharjan

The ajax request is this :
code
URL: http://184.72.60.78:8080/skuapp/api/job/createJob
Params:

---------------------

name: String
jobDescription: String
storeId: Number
upc:String
auditorId:Number

---------------------

Content-Type: application/x-www-form-urlencoded
Accept: application/xml

For now test with these params : name:NewJob jobDescript:newDesc storeId:14 upc:700023001335 and auditorId can be multiple values [31,36,41,46]
/code

here auditorId can be multiple supported. I have already tested and works normally but not sure why my service when mapped with the checkboxgroups to auditorId
then it will not work.

Thanks


Sending Checkboxgroup in parameter

Posted: Mon Feb 16, 2015 1:16 pm
by Evgene Karachevtsev

Hello,

Could you please show us screenshots of your mapping?


Sending Checkboxgroup in parameter

Posted: Mon Feb 16, 2015 2:22 pm
by Narayan G. Maharjan

Image

Here it is


Sending Checkboxgroup in parameter

Posted: Mon Feb 16, 2015 5:46 pm
by Illya Stepanov

Hi -

Please try move 'auditorId' from Query String of Service to Body and set for it an Array type.


Sending Checkboxgroup in parameter

Posted: Tue Feb 17, 2015 1:43 pm
by Narayan G. Maharjan

I tried but it did not work. Also when i used the auditorId as body there are not any array representation Image


Sending Checkboxgroup in parameter

Posted: Tue Feb 17, 2015 3:57 pm
by Ihor Didevych

Hi,

What is your service's method - GET or POST? You can't define body parameter's type for GET, but you could do it for POST


Sending Checkboxgroup in parameter

Posted: Wed Feb 18, 2015 6:09 am
by Narayan G. Maharjan

I have all in POST.


Sending Checkboxgroup in parameter

Posted: Wed Feb 18, 2015 6:28 am
by Narayan G. Maharjan

Here is screenshot of my service
Image