You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by H....@MI.unimaas.nl on 2004/05/07 23:25:43 UTC
Help! Question on authentication + flow + passing on data
Hi,
I'm using the authentication-fw with flowscripts (as in the sample). But I
have a problem now: I want to pass on viewData/bizData to the resulting
page. If this page is in an internal pipeline (i.e. user is logged in), I
get an error on "missing authentication context". If the resulting page is
the public counterpart of this internal pipeline, I get the authentication
context, but all viewData/bizData info is lost.
Can anyone help?
Specifics:
<map:match pattern="public/*">
<map:call function="protect">
<map:parameter name="internal-redirect" value="internal/{1}"/>
</map:call>
</map>
<map:pipeline internal-only="true">
<map:match pattern="internal/*.html>
<map:call function="prot_myFunc"/>
</map:match>
<map:match pattern="internal/*.form">
<map:generate type="jx" src="{1}.jx"/>
<map:transform type="session"/>
<map:transform src="toHTML.xsl"/>
<map:serialize type="html"/>
</map:match>
</map:pipeline>
function prot_myFunc_v1() {
doSomething();
var viewData = {list: someData, nr: someData.size() };
cocoon.sendPage("internal/result.form", viewData);
}
function prot_myFunc_v2() {
doSomething();
var viewData = {list: someData, nr: someData.size() };
cocoon.sendPage("public/result.form", viewData);
}
prot_myFunc_v1 results in the "no authentication context" error.
prot_myFunc_v2 has lost the viewData contents.
Any ideas?
Bye, Helma
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Help! Question on authentication + flow + passing on data
Posted by Leon Widdershoven <qa...@dds.nl>.
The <map:match... part should be in an authentication frameword map:act
I think. At least - there should
be a map:act somewhere to insert the auth context.
And where the bizzData goes in part two I do not know:(
And in stead of nr: someData.size() - if you use forEach - you might want
a <forEach var="item" varStatus="count" items="${list}">
count=${index.count}
currIndex=${index.index}
</forEach>
or something like that:)
Leon
H.vanderLinden@MI.unimaas.nl wrote:
>Hi,
>
>I'm using the authentication-fw with flowscripts (as in the sample). But I
>have a problem now: I want to pass on viewData/bizData to the resulting
>page. If this page is in an internal pipeline (i.e. user is logged in), I
>get an error on "missing authentication context". If the resulting page is
>the public counterpart of this internal pipeline, I get the authentication
>context, but all viewData/bizData info is lost.
>
>Can anyone help?
>
>Specifics:
>
><map:match pattern="public/*">
> <map:call function="protect">
> <map:parameter name="internal-redirect" value="internal/{1}"/>
> </map:call>
></map>
>
><map:pipeline internal-only="true">
> <map:match pattern="internal/*.html>
> <map:call function="prot_myFunc"/>
> </map:match>
> <map:match pattern="internal/*.form">
> <map:generate type="jx" src="{1}.jx"/>
> <map:transform type="session"/>
> <map:transform src="toHTML.xsl"/>
> <map:serialize type="html"/>
> </map:match>
></map:pipeline>
>
>function prot_myFunc_v1() {
> doSomething();
> var viewData = {list: someData, nr: someData.size() };
> cocoon.sendPage("internal/result.form", viewData);
>}
>
>function prot_myFunc_v2() {
> doSomething();
> var viewData = {list: someData, nr: someData.size() };
> cocoon.sendPage("public/result.form", viewData);
>}
>
>prot_myFunc_v1 results in the "no authentication context" error.
>prot_myFunc_v2 has lost the viewData contents.
>
>Any ideas?
>
>Bye, Helma
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org