I am new to TYPO3 world and would appreciate your help.
At the moment I am trying to do a list of items with action buttons for each item. Buttons are edit and delete. There is also a create button on the page so user will be able to add new item in the list.
The results should be given in the same page, so I need AJAX or some kind of response that won’t refresh my page but will write in the list, either new item or will edit existing item or will remove deleted one from the list .
As far as I searched I found out that there are frontend and backend ajax.
Frontend ajax can be called either via eID or pageNum, but for newer versions of TYPO3 it is made through Middlewares.
Can someone please explain how to do it with Middlewares, or any other…
I need to get to the controller and to do some magic with db and to return response to the page without refreshing it.
The most common is to create some extbase controller where some actions return JSON. You need to use rhe PropagateResponseException to make your response the main response of TYPO3 instead of the whole page rendering.
The 2nd most common is via a Middleware. Middleware are better suited for early responses as you can deside where in the stack you want your middle where to come.
So you don’t need to initalize the whole fronted stack. Middlewares are great.
And as you already found out there is eID this was the first (and still supported) early entry point. But you might have to initalize parts of the system yourself as its implemented as an early Middleware you cant decide how much of the system should be initalized be for your script is called