You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Antonio Gallardo <ag...@agsoftware.dnsalias.com> on 2003/11/23 07:36:38 UTC
[Flow] Setting request-parameters
Hi:
I am trying to use the authentication-fw with woody and flow. I am trying
to use as template the current flow implementation.
Is this posible to set request-parameters inside a flow function right
after a woody call? I just only found a way to set request attributes:
function loginform(form) {
var redirect = cocoon.parameters["protected-redirect"];
form.showForm("entrada-vista");
cocoon.request.setAttribute("username",
form.getWidget("auth_user").getValue());
cocoon.request.setAttribute("passwd",
form.getWidget("auth_passwd").getValue());
cocoon.request.setAttribute("resource", redirect);
cocoon.sendPage("do-login");
}
In the do-login I don't have problem, the above solution works and set the
values that can be read inside the sitema, but when the authenticator
calls the "authentication uri" defined as:
<authentication uri="cocoon:raw://myauth"/>
and inside the sitemap is another flow call to allow retrieve the data
from the database:
<map:match pattern="myauth">
<map:call function="autentificar">
<map:parameter name="parameter_name" value="??????"/>
</map:call>
</map:match>
Here the problems starts, because I cannot find how to set the
"parameter_name" and the "parameter_password"
In the auth-fw sample we need request-param that using flow I cannot have.
Please help.
Best Regards,
Antonio Gallardo
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: [Flow] Setting request-parameters
Posted by Bruno Dumon <br...@outerthought.org>.
On Sun, 2003-11-23 at 07:36, Antonio Gallardo wrote:
> Hi:
>
> I am trying to use the authentication-fw with woody and flow. I am trying
> to use as template the current flow implementation.
>
> Is this posible to set request-parameters inside a flow function right
> after a woody call?
nope, request parameters can never be modified.
> I just only found a way to set request attributes:
>
> function loginform(form) {
> var redirect = cocoon.parameters["protected-redirect"];
> form.showForm("entrada-vista");
> cocoon.request.setAttribute("username",
> form.getWidget("auth_user").getValue());
> cocoon.request.setAttribute("passwd",
> form.getWidget("auth_passwd").getValue());
> cocoon.request.setAttribute("resource", redirect);
> cocoon.sendPage("do-login");
> }
>
> In the do-login I don't have problem, the above solution works and set the
> values that can be read inside the sitema, but when the authenticator
> calls the "authentication uri" defined as:
>
> <authentication uri="cocoon:raw://myauth"/>
>
> and inside the sitemap is another flow call to allow retrieve the data
> from the database:
>
> <map:match pattern="myauth">
> <map:call function="autentificar">
> <map:parameter name="parameter_name" value="??????"/>
> </map:call>
> </map:match>
>
> Here the problems starts, because I cannot find how to set the
> "parameter_name" and the "parameter_password"
{request:getAttribute(., 'username')} if I remember well
though you might need to update CVS first, I saw Ricardo commited a fix
related to calling setAttribute from flow.
--
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org bruno@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org