The task is to change main view of every page dependant on if user is
logged or not.
The subtask is to get out authentication context into normal context.

This is weird solution i figured out:
      <map:match pattern="do-login">
        <!-- try to login -->
        <map:act type="auth-login">
          <map:parameter name="handler" value="mainhandler"/>
          <map:parameter name="parameter_loginame" value="{request-param:loginame}"/>
          <map:parameter name="parameter_password" value="{request-param:password}"/>
          <map:aggregate element="jopa">
            <!-- this xml commands to create and merge contexts -->
            <map:part src="resources/merge-auth-context.xml"/>
            <!-- this is original page where login was submitted -->
            <map:part src="cocoon://{request-param:resource}"/>
          </map:aggregate>
          <map:transform type="session"/>
          <!-- this XSLT removes html page out of aggregation -->
          <map:transform src="trans/utils/outofjopa.xslt"/>
          <map:serialize type='html'/>
        </map:act>
        <!-- something was wrong, get back to the innocence -->
        <map:redirect-to uri="{request-param:resource}"/>
      </map:match>

This works, but looks too ugly.
And the url in browser is left as "do-login", because there was no redirect.
It is not valid to do <redirect> after <generate>.

Maybe i miss something conceptual here ?

Is original task implementable using standard components ?
If not, could someone hint me what components should i reimplement ?
(actions|session contexts|whatever) ?

-- 
 qMax


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

Reply via email to