A Cocoon Sitemap component that manipulates runtime parameters based on the request and application state. The results of the manipulation are available to other site map components.
Actions are useful for:
Also seems very similar to the Model part of the standard Model 2 MVC set-up. In fact Generators (particularly XSP pages) can be used to fill the Model role for a particular request. Generators fit the role better however.
For a more apt MVC design, check out Flow Script (Flow or WhatIsFlow).
Actions are declared as follows:
<map:actions> <map:action name="add-employee" src="org.apache.cocoon.acting.DatabaseAddAction"/> <map:action name="locale" src="org.apache.cocoon.acting.LocaleAction"/> <map:action name="request" src="org.apache.cocoon.acting.RequestParamAction"/> <map:action name="form-validator" src="org.apache.cocoon.acting.FormValidatorAction"/> </map:actions> |
Cocoon has several built-in Actions