Jorg,
Thank you for all your help.
It would seem that should be the case, but it is
included in the "if(form.submitID == "save") and so,
(when I use the non-hidden continuations), it does not
loop.
For some reason when the continuation becomes hidden
and the matching is on Type, it loops on the
form.showForm(arrayAdmin) inside the if block - i.e.
it does not seem to realize that on the second loop
that form.submitID should no longer be "save".
Anyway, what I have done is this - move to a simpler,
but hopefully as useful version that was almost
trivial to implement.
In my login screen, on submit, I call a login.js that
authenticates the user in the database, and as a
result of the db call, creates a user bean.
I simply put that user bean into the session using the
following:
cocoon.session.setAttribute('userBean' ,
userBean);
then, on every js, I check to see if the session has
the bean
var userBean = cocoon.session.get('userBean');
If the user is authenticated the userBean should be
validated else, I redirect the user to the login page.
If the user has already logged in, and the session is
still alive, and would get the requested protetected
page seamlessly.
I then don't have to mess around with the sitemap
adding protections etc., the single js library
function does it for me.
regards
Paul
--- Jorg Heymans <[EMAIL PROTECTED]> wrote:
> <snip/>
>
> >
> > <map:match pattern="arrayAdmin">
> > <map:call function="arrayAdmin">
> > <map:parameter name="bindingURI"
> > value="arrayadmin_bind.xml"/>
> > </map:call>
> > </map:match>
> >
> > function arrayAdmin() {
>
> <snipped/>
>
> > function arrayAdmin() {
> ........
> > // Let Cocoon Forms handle the form
> > if(form.submitId == "save") {
> > form.save(bean);
> > dao.setObject(bean);
> > form.showForm("arrayAdmin"); //this same function
> > }
>
> showForm("arrayAdmin") calls a pipeline that matches
> "arrayAdmin", but
> in that pipeline you call the function "arrayAdmin"
> again. Are you sure
> this is how it's supposed to work? I think that is
> the source of your
> infinite loop.
>
> Regards
> Jorg
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]