[TYPO3-mvc] TYPO3 6.x way for extbase ajax applications

Gianluca Strafella gianluca.strafella at webformat.com
Tue Apr 16 18:33:46 CEST 2013


Hi Joerg,
keep in mind that if you have defined the pid configuration in a 
flexform (for example), you have to add additional settings in 
TypoScript to include both the page that contains the plugin and the 
plugin flexform, in ajax request.

Regards,
Gianluca

Il 16/04/2013 12:09, Joerg Schoppet ha scritto:
> Hi Robert,
>
> thanks for the answer. But I have a more general problem.
>
> I have a class \DerJoerg\Example\Domain\Model\Driver which extends
> \TYPO3\CMS\Extbase\Domain\Model\FrontendUser.
>
> In the "DriverController" I have a simple listAction, which just
> displays all "Drivers". --> Working.
> <snippet>
> $drivers = $this->driverRepository->findAll();
> $this->view->assign(...);
> </snippet>
>
> If I call this through the "ajax-way" (either by typeNum or eID) and
> modify the action to:
> <snippet>
> $drivers = $this->driverRepository->findAll();
> $result = new array();
> foreach ($drivers as $driver) {
>   $result[] = $driver->getUsername();
> }
> return json_encode($result);
> </snippet>
>
> It returns an empty array :(
>
>
> Joerg
>
>
>
> Quote: Robert Böttner wrote on Tue, 16 April 2013 11:53
> ----------------------------------------------------
>> Hi Joerg,
>>
>> depending what you are doing with the response you´ll have to return
>> it in that way. If you are using the method to load data into an ExtJS
>> store your response has to be a json object structured like the your
>> stores underlying model. If you are using HTML as a return a simple
>> panel.update() with your response text should do.
>>
>> I´m using the eID approach and a store configuration may look like:
>>
>>
>> Best
>> Robert.
>>
>>
>> Am 16.04.2013 um 11:17 schrieb Joerg Schoppet <joerg at schoppet.de>:
>>
>> > Hi list,
>> > > I'm in the process of creating a new extension, which should be
>> up-to-date regarding the coding-standards of TYPO3 6.x and extbase.
>> Additionally I want to create a complete ExtJS application in the
>> frontend.
>> > > I found some (not so much) information in the web (including the
>> blog of Daniel Lienert and also the pt_extbase extension).
>> > > I tried the typeNum-way and also the eID-way, but still I have one
>> unresolveable problem.
>> > > With the extbase_kickstarter I created an extension, which holds a
>> class which extends the fe_users class from Extbase. Currently this
>> class doesn't has any additional fields.
>> > > If I create new frontend-users with this "type" I can have the
>> list-action in the frontend output all the users.
>> > > BUT
>> > > If I try to get these users with an ajax-request (typeNum- or
>> eID-way) I get no result.
>> > > Can anybody point me in the right direction what the problem is?
>> > > > Thanks a lot.
>> > > Joerg
>> > _______________________________________________
>> > TYPO3-project-typo3v4mvc mailing list
>> > TYPO3-project-typo3v4mvc at lists.typo3.org
>> >
>> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc
> ----------------------------------------------------
>
>


-- 
Gianluca Strafella

Software Developer
gianluca.strafella at webformat.com
Tel.   +39-0427-926.389

WEBFORMAT srl – www.webformat.com
Via S. Francesco d'Assisi, 6 – 20122 MILANO
Corte Europa, 12 - 33097 SPILIMBERGO (PN)



More information about the TYPO3-project-typo3v4mvc mailing list