[Flow] Remove does not remove
chris Wolff
chris at connye.com
Fri Nov 1 15:43:44 CET 2013
Hi Axel,
to explain it in simple terms
every link triggers a HTTP GET (regadless of the controller or action you call)
most forms trigger a HTTP POST (<form method="post" ..)
the idea is that GET is Read Only and POST is for Writing/Modifing data.
(there are other HTTP Methods but i ommit explaination here to keep it simple)
Most modern HTTP Frameworks Implement such an Architecture know as REST
see wikipeda for more details:
https://en.wikipedia.org/wiki/Representational_state_transfer
as a GET request should always be "save" so a browser could prefect
the next page you visiting without deleting or modifiing data.
with CSS its possible to style form buttons als links and vice versa.
regards chris
2013/11/1 Bastian Waidelich <bastian at typo3.org>:
> Axel Wüstemann wrote:
>
>> I do it within a regulary deleteAction, so by my mind this is not a save
>> request methode, or?
>
>
> Don't confuse "HTTP method" (aka "HTTP verb") with a "PHP function" (aka
> "method" of a class).
>
> You can call your action "thisIsAVeryUnsafeAction()" and Flow still won't
> know that it should automatically persist your changes.
>
> Instead, Flow will automatically invoke *PersistenceManager::persistAll()*
> after all unsafe *HTTP requests*.
>
>
> GET requests are not meant to change the server state – thus a delete link
> is invalid according to the HTTP specification and should be replaced by a
> form with method="post" (or an ajax request with method = "DELETE").
>
> BTW: We did the same mistake in the Flow Quickstart[1] and should
> update the documentation. But the TYPO3.Kickstart package has been fixed
> already and if you follow the examples your code should work as expected.
>
>
> [1]
> http://docs.typo3.org/flow/TYPO3FlowDocumentation/Quickstart/Index.html#storing-objects
>
>
> --
> Bastian Waidelich
> --
> Core Developer Team
>
> TYPO3 .... inspiring people to share!
> Get involved: typo3.org
> _______________________________________________
> Flow mailing list
> Flow at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/flow
--
christian wolff - webdeveloper, tech-loving geek and typo3 enthusiast
telefon: +49 30 347 244 88
mobil: +49 179 49 44 758
email: chris at connye.com
adresse: friedelstraße 31 - 12047 berlin
xing-profil: https://www.xing.com/profile/Christian_Wolff43
google+: https://google.com/+chriswolff
facebook: https://www.facebook.com/1stMachine
flattr: https://flattr.com/profile/1stmachine
More information about the Flow
mailing list