[TYPO3-english] ControllerAction & JSON Response

Dirk Wenzel wenzel at webfox03.de
Sat Dec 14 12:46:10 CET 2013


Hi,
thank you! Very good to know.

By the way: Would you use a special (ajax) action (which probably should 
be called by an Ajax dispatcher) or just the common action with a 
parameter which determines the return type?

Actualy that's two questions:
1. Is there any drawback (for instance performance issues) using a 
'normal' call without dispatcher.
2. Is it 'clean' to return different output from one method.

Cheers
Dirk

Am 13.12.13 12:33, schrieb Anja Leichsenring:
> Hi Jan,
>
> using a return statement is perfectly fine.
> By the way you can use return in all actions to provide your own
> rendering result without asking Fluid to do anything. That is no
> workaround, but a proper feature and the recommended way if you don't
> need Fluid.
>
> Greetz Anja
>
> On 12/12/2013 10:28 PM, Jan Kornblum wrote:
>> Hi newsgroup,
>>
>> i'm not sure what is the better way to behave like extbase likes:
>>
>> I've got an Ajax-called ControllerAction without view which returns a
>> JSON object. Is it "ok" to exit the ControllerAction using
>> return($jsonobject) or would it be better to use a view for this action
>> and ouput the JSON object from the view?
>>
>> Kind regards, Jan
>>
>>
>


More information about the TYPO3-english mailing list