You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Angelo Immediata <An...@libero.it> on 2006/03/04 10:31:33 UTC

Cocoon Portal and my own Action class

Hi all. I'm using cocoon portal block. Cocoon version is 2.1.7.

I have this little problem that i'm not able to solve: i must call a  my own action when the user (both anonymous and logged-in) has had the acces to the portal.
This action is a very simple action but i need it.
I have tried to set my action call in this point of the portal sitemap:

       <!-- Start the authentication process -->
       <map:act type="auth-login">
         <map:parameter name="handler" value="portal-handler"/>
         <map:parameter name="application" value="portal"/>
         <map:parameter name="parameter_name" value="{request-param:name}"/>
         <map:parameter name="parameter_password" value="{request-param:password}"/>
         <map:parameter name="parameter_idCarta" value="{request-param:idCarta}"/>
         <map:parameter name="parameter_PIN" value="{request-param:PIN}"/>
         <map:parameter name="parameter_Username_Operatore" value="{request-param:Username_Operatore}"/>
         <map:parameter name="parameter_Password_Operatore" value="{request-param:Password_Operatore}"/>
         <map:parameter name="parameter_ID_transazione_CRM" value="{request-param:ID_transazione_CRM}"/>
         <!-- Authentication succeeded -->
         <map:act type="pmm"/>
         <map:act type="portal-login"/>

But this action is never called. I have tried in several point of the portal sitemap (even if i think that where i put it before is the right one since here the user can see the portal) but it's never called.

In order to call my action i must put its call in this point of the sitemap:

     <!-- Do an auto login as anonymous -->
     <map:act type="auth-loggedIn">
       <map:parameter name="handler" value="portal-handler"/>
       <map:parameter name="application" value="portal"/>
       <map:parameter name="negate-result" value="true"/>
       <map:act type="auth-login">
         <map:parameter name="handler" value="portal-handler"/>
         <map:parameter name="application" value="portal"/>
         <map:parameter name="parameter_name" value="anonymous"/>
         <map:parameter name="parameter_password" value="anonymous"/>
       </map:act>
     </map:act>
     <!-- Test pipeline for layout engine -->
     <map:match pattern="portal">
       <map:act type="auth-protect">
         <map:parameter name="handler" value="portal-handler"/>
         <map:parameter name="application" value="portal"/>
         <map:generate type="portal" label="content"/>
         <map:transform src="{portal-skin:skin.basepath}/styles/portal-page.xsl">
           <map:parameter name="user" value="{ID}"/>
         </map:transform>
         <map:transform type="cinclude"/>
         <map:transform type="portal-coplet"/>
         <map:transform type="portal-new-eventlink"/>
         <map:transform type="encodeURL"/>
	 <map:transform src="{portal-skin:skin.basepath}/styles/filtro_ns.xsl"/>
         <!--
         <map:transform type="htmlroot" />
         -->
         <!-- If you don't need JSR-168 support, you can use the html serializer instead -->
	 <map:act type="pmm-logger"/>
	 <!--map:serialize type="html-include"/-->
         <map:serialize type="xhtml"/>
       </map:act>
     </map:match>

But i have seen that by doing in this way this action is called on every click of portal.
I want that it's called only when the login is successfully.
How can i solve this problem?
Thanks to all,
 Angelo.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org