You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Derek Hohls <DH...@csir.co.za> on 2004/07/14 10:30:57 UTC

Authentication - accessing user info in JXTemplateGenerator?

I am trying to access the user information, after login,
in a JXTemplate Generator page, which is *not* called
by any flow...

I have tried:
  #{cocoon/session/context/authentication/authentication/ID}
and
 #{cocoon/session-context/authentication/authentication/ID}

I have also tried passing the info, from within the sitemap,
as parameters:

  <map:generate  type="jx" src="docs/mypage.jx">
     <map:parameter name="userID" 
value="{session-context:authentication/authentication/ID}"/>
  </map:generate>

And then accessing the parameter as follows:

  #{cocoon/parameters/userID}
and
  ${cocoon.parameters.getAttribute('userID')}

But without any success... if anyone can point me
to the right syntax, or appropriate method, I would
appreciate it!

Thanks
Derek

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.


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


Re: Authentication - accessing user info in JXTemplateGenerator?

Posted by Guido Casper <gc...@s-und-n.de>.
Derek Hohls wrote:
> And then accessing the parameter as follows:
> 
>   #{cocoon/parameters/userID}
> and
>   ${cocoon.parameters.getAttribute('userID')}

I think that should be:

${parameters.getParameter('userID')}


HTH
Guido

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