Hi, C2ers!

Can anybody explain me why the getAction() method is in Environment
interface? Why the action param name (cocoon-action) is hard-coded and
cannot be configured? I'd like to have a possibility to select (filter)
actions to be performed by a more flexible way. I'd propose to make the
action selection mechanism configurable in sitemap. E.g.:

<map:action-sets>
  <map:action-set name="authentication" selector="url-selector">
    <map:act type="session-invalidator" action="logoff"/>
    <map:act type="session-validator"/>
    <map:act type="session-create" action="authenticate"/>
  </map:action-set>
  <map:action-set name="shop-actions" selector="url-param-selector">
    <map:act type="cart-add" action="addItem"/>
    <map:act type="cart-remove" action="removeItem"/>
    <map:act type="cart-remove-all" action="removeAll"/>
    <map:act type="cart-update" action="updateQty"/>
  </map:action-set>
</map:action-sets>

So, there could be different ways of determining if the action matches the
current request. Example:
1. URL: http://host/login - uses the URL itself to determine the action and
matches the <map:act type="session-create" action="authenticate"/>
2. URL: http://host/cart?action=addItem - uses URL param to select an action
and matches <map:act type="cart-add" action="addItem"/>

More complicated behavior is also possible (matching actions by wildcards,
regular expressions, etc.).

Are there any comments, future plans or something related to actions? Design
patterns of developing complicated sitemaps with a lot of actions or so
would be fine.

Best regards,

Konstantin Piroumian
Sr. Software engineer

Protek Flagship LLC
Phone: + 7 095 795 0520 (add. 1288)
Fax: + 7 095 795 0525
E-mail: [EMAIL PROTECTED]
http://www.protek.com











---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to