cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Joseph <pjoseph...@yahoo.com>
Subject Re: authentication framework and continuations
Date Fri, 15 Oct 2004 17:44:48 GMT
I login - the template file for the login has the
hidden <ft:continuation-id/>

this takes me to an admin form.

The template for this form has the <ft:continuation/>

The sitemap is set to match the type.

In my logs I see lines like this (it keeps going in a
loop)

thx
Paul

Processor24/ForwardRedirector: Redirecting to
'cocoon:/login-display-pipeline'
INFO    (2004-10-15) 13:27.44:529   [sitemap]
(/array/webtask/dictionary/login)
http-9090-Processor24/ForwardRedirector: Redirecting
to 'cocoon:/login-display-pipeline'
INFO    (2004-10-15) 13:27.56:106   [sitemap]
(/array/webtask/dictionary/login)
http-9090-Processor24/ForwardRedirector: Redirecting
to 'cocoon:/login-display-pipeline'
INFO    (2004-10-15) 13:28.02:966   [sitemap]
(/array/webtask/dictionary/login)
http-9090-Processor24/ForwardRedirector: Redirecting
to 'cocoon:/login-display-pipeline'
INFO    (2004-10-15) 13:29.21:849   [sitemap]
(/array/webtask/dictionary/login)
http-9090-Processor23/ForwardRedirector: Redirecting
to 'cocoon:/authenticate'
INFO    (2004-10-15) 13:29.21:859   [sitemap]
(/array/webtask/dictionary/login)
http-9090-Processor23/ForwardRedirector: Redirecting
to 'cocoon:/authenticate'
INFO    (2004-10-15) 13:29.21:869   [sitemap]
(/array/webtask/dictionary/login)
http-9090-Processor23/ForwardRedirector: Redirecting
to 'cocoon:/authenticate'
INFO    (2004-10-15) 13:29.21:869   [sitemap]
(/array/webtask/dictionary/login)
http-9090-Processor23/ForwardRedirector: Redirecting
to 'cocoon:/authenticate'
INFO    (2004-10-15) 13:29.21:869   [sitemap]
(/array/webtask/dictionary/login)
http-9090-Processor23/ForwardRedirector: Redirecting
to 'cocoon:/authenticate'
INFO    (2004-10-15) 13:29.21:879   [sitemap]
(/array/webtask/dictionary/login)
http-9090-Processor23/ForwardRedirector: Redirecting
to 'cocoon:/authenticate'
I

--- Jorg Heymans <jh@domek.be> wrote:

> did you change *all* your forms to have the
> <ft:continuation-id /> ?
> 
> Paul Joseph wrote:
> > Hi,
> > 
> > The culprit appears to be the 
> > 
> > form.showForm(ArrayAdmin); 
> > line
> > 
> > It seems to loop *continously* on this line when I
> > match on 
> > 
> >  <map:match type="request-parameter"
> >  pattern="continuation-id">
> >     <map:call continuation="{1}"/>
> >  </map:match>
> > 
> > However, it does not loop if I use
> > 
> > <map:match pattern="*.continue">
> >     <map:call continuation="{1}"/>
> >  </map:match>
> > 
> > though in the latter case I loose authentication
> > capability.
> > 
> > Is there any way around this? Use authentication,
> > continuations and form.showForm together?
> > 
> > thx!
> > Paul
> > 
> > 
> > rather than
> > 
> > 
> > --- Paul Joseph <pjoseph_98@yahoo.com> wrote:
> > 
> > 
> >>Getting there, but not quite there yet...am
> getting
> >>into a "loop" situation with the hidden
> >>continuation.
> >>
> >>When I use the continuation as a hidden field in
> my
> >>form template as shown below:
> >>
> >><ft:form-template action="" method="POST">
> >><ft:continuation-id/>
> >>
> >>and with my sitemap as below:
> >>
> >><map:match pattern="*">
> >>    <map:act type="auth-protect">
> >>    <map:parameter name="handler"
> >>value="simpleauthenticator"/>
> >> 
> >><map:match type="request-parameter"
> >>pattern="continuation-id">
> >>   <map:call continuation="{1}"/>
> >></map:match>
> >>
> >><map:match pattern="arrayadmin-display-pipeline">
> >>  <map:generate src="arrayadmin_template.xml"/>
> >>  <map:transform type="forms"/>
> >>  <map:transform
> >>
> > 
> >
>
src="context://resources/resources/forms-arrayadmin-styling.xsl"/>
> > 
> >>  <map:serialize/>
> >></map:match>
> >>
> >><map:match pattern="arrayAdmin">
> >>  <map:call function="arrayAdmin">
> >>  <map:parameter name="bindingURI"
> >>value="arrayadmin_bind.xml"/> 
> >>  </map:call>
> >></map:match>
> >>
> >></map:act>
> >></map:match>
> >>
> >>it seems to go into a loop, till something times
> out
> >>at which point, it shows a blank page (any changed
> >>data *is* saved)...
> >>
> >>any ideas?
> >>
> >>My script is as follows and I suspect that the
> last
> >>line in it keeps causing it to loop. What should
> the
> >>last line be like to show the form again with the
> >>new
> >>(saved) values?
> >>
> >>function arrayAdmin() {
> >>    var bindingURI =
> >>cocoon.parameters["bindingURI"];
> >>    var form = new Form("arrayadmin.xml");
> >>    var model = form.getModel();
> >>    form.createBinding("arrayadmin_bind.xml"); 
> >>    var beanClass = new
> >>
> > 
> >
>
Packages.org.apache.cocoon.ojb.samples.bean.ArrayAdmin();
> > 
> >>    var bean  = dao.getObject(beanClass,"id",0);
> >>    form.load(bean);
> >>   form.showForm("arrayadmin-display-pipeline",
> >>selectListData);
> >>     
> >>    // Let Cocoon Forms handle the form
> >>   if(form.submitId == "save") {
> >>   	form.save(bean);
> >>        dao.setObject(bean);
> >>	form.showForm("arrayAdmin"); //this same function
> >>   }
> >>      cocoon.releaseComponent(factory);
> >>}
> >>
> >>I susepct the form.showForm("arrayAdmin") is
> causing
> >>it to loop, but strangely this used to work when
> the
> >>sitemap was unprotected and I was using the
> explicit
> >>continuation i.e. no hidden ft:continuation-id in
> >>template and using an explicit *.continuation
> match
> >>in
> >>the sitemap.
> >>
> >>TIA!
> >>Paul
> >>
> >>
> >>
> >>--- Jorg Heymans <jh@domek.be> wrote:
> >>
> >>
> >>>you would just do
> >>>
> >>><ft:form-template action="" method="POST">
> >>><ft:continuation-id/>
> >>><ft:widget id ="mywidget"/>
> >>>......
> >>>
> >>></ft:form>
> >>>
> >>>
> >>>
> >>>Paul Joseph wrote:
> >>>
> >>>>Jorg,
> >>>>
> >>>>thank you very much.
> >>>>
> >>>>I will try this approach - just wasn't sure how
> >>
> >>to
> >>
> >>>use
> >>>
> >>>>the <ft:continuation-id> tag in my template.
> >>>>
> >>>>Do I simpley do this anywhere reasonable in the
> >>>>template:
> >>>>
> >>>><ft:continuation-id><fi:styling
> >>>>type="hidden"/></ft:continuation-id>
> >>>>
> >>>>-hopefully, this will be my last question, sorry
> >>>
> >>>for
> >>>
> >>>>the bother and thanks for the help so far.
> >>>>
> >>>>rgds
> >>>>Paul
> >>>>--- Jorg Heymans <jh@domek.be> wrote:
> >>>>
> >>>>
> >>>>
> >>>>>Paul Joseph wrote:
> >>>>>
> >>>>>
> >>>>>>1. So for this to work there is no need to use
> >>>>>>encodeURL? I was under the impression that
> >>>>>
> >>>>>encodeURL
> >>>>>
> >>>>>
> >>>>>>was needed as the auth framework created a
> 
=== message truncated ===


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


Mime
View raw message