Log message #4103228

# At Username Text
# Dec 13th 2017, 13:22 jkpatel291289 i have a from on which i want to add option to select trucks..
# Dec 13th 2017, 13:19 hmic now you dont even need an action for it, but can decide what to do on the request type in the very same action displaying the control - just saying
# Dec 13th 2017, 13:18 hmic looks good
# Dec 13th 2017, 13:17 jkpatel291289 this worked, thanks
# Dec 13th 2017, 13:17 jkpatel291289 return $this->response->withType('application/json') ->withStringBody(json_encode($resultsArr));
# Dec 13th 2017, 13:14 hmic cant remember
# Dec 13th 2017, 13:14 hmic yeah, might be another function name, stringBody or something
# Dec 13th 2017, 13:13 jkpatel291289 got this error "Argument 1 passed to Cake\Http\Response::withBody() must implement interface Psr\Http\Message\StreamInterface, string given, called in D:\xampp\htdocs\agnitrans\src\Controller\TrucksController.php on line 124
# Dec 13th 2017, 13:12 hmic return $this->response->withHeader('Content-Type', 'application/json')->withBody(json_encode($resultsArr));
# Dec 13th 2017, 13:10 jkpatel291289 i am newbi.. can you show me how? i am trying to create autocomplete controll
# Dec 13th 2017, 13:10 hmic like i said: set the data to the response object and return it!
# Dec 13th 2017, 13:09 jkpatel291289 so what you suggest?
# Dec 13th 2017, 13:09 jkpatel291289 ohh..
# Dec 13th 2017, 13:09 hmic https://gist.github.com/jaynarayan89/0eec17e993dad9c4ceb0567014ca764b#file-gistfile1-txt-L13
# Dec 13th 2017, 13:08 jkpatel291289 :,)
# Dec 13th 2017, 13:08 jkpatel291289 check the gist..:point_up:
# Dec 13th 2017, 13:08 hmic :P
# Dec 13th 2017, 13:08 hmic show me the updated code without echo
# Dec 13th 2017, 13:07 jkpatel291289 yes, i am not echoing from controller.. thanks for your help
# Dec 13th 2017, 13:07 jkpatel291289 oh thanks.. silly my i just noticed...:c :upside_down_face:
# Dec 13th 2017, 13:07 hmic and still - you don't echo from an controller action!
# Dec 13th 2017, 13:06 hmic like i said - typo
# Dec 13th 2017, 13:05 jkpatel291289 here is the actual code
# Dec 13th 2017, 13:05 jkpatel291289 https://gist.github.com/jaynarayan89/0eec17e993dad9c4ceb0567014ca764b
# Dec 13th 2017, 13:04 hmic requrest
# Dec 13th 2017, 13:04 hmic dont!
# Dec 13th 2017, 13:04 jkpatel291289 whats the typo?
# Dec 13th 2017, 13:04 jkpatel291289 i am echoing tust for testing..
# Dec 13th 2017, 13:02 hmic you set to the response and return it
# Dec 13th 2017, 13:02 hmic and you don't echo from a controller action
# Dec 13th 2017, 13:01 hmic typo
# Dec 13th 2017, 13:01 jkpatel291289 public function getAjaxList() { if ($this->requrest->is('ajax')) { echo 'ajax'; } } when i access this method from url request is false and is() mwthod not working why?
# Dec 13th 2017, 12:33 megan awesome
# Dec 13th 2017, 12:33 joopm i made a request :)
# Dec 13th 2017, 12:32 joopm thank you for the invitation
# Dec 13th 2017, 12:31 joopm i would be happy
# Dec 13th 2017, 12:31 megan (roadtrip plans and dates have not been announced yet)
# Dec 13th 2017, 12:31 megan At this point there is Roadtrip, but only one entry from Budapest - you are welcome to submit to https://cakephp.org/pages/road_trip :slightly_smiling_face:
# Dec 13th 2017, 12:27 admad joopm: you can contact @megan if you are interested in helping organize cakefest :slightly_smiling_face:
# Dec 13th 2017, 10:23 joopm well if no plans i can help maybe in the organization
# Dec 13th 2017, 10:19 hmic I still think it's quite unfair to have 2 US cakefests and 1 outside-US schedules