cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gunter D'Hondt <gunter.dho...@sofico.be>
Subject Re: How can I stop user revisiting a CForm with the Back button?
Date Tue, 27 Jul 2004 12:40:30 GMT
thru javascript "history.forward();" on every page (so when the 
back-button is used it automatically does a forward again; and browsers 
like IE uses caching for this so there is no server action triggered
Gunter




Ugo Cei <u.cei@cbim.it> 
27/07/2004 14:27
Please respond to
users@cocoon.apache.org


To
users@cocoon.apache.org
cc

Subject
Re: How can I stop user revisiting a CForm with the Back button?






Colin Paul Adams wrote:
> That doesn't actually prevent the back button returning to the form.
> What id does do, however, is when the user submits the form, it throws
> an org.apache.cocoon.components.flow.InvalidContinuationException:

Right. If you want to block completely the usage of the back button, 
you'll have to play with client-side caching and browser differences and 
the like. There was a thread on this issue some time ago on this list, 
but I didn't follow it since I don't think it's worth the hassle.

> I can't seem to catch this in the flowscript. Is there a way to catch
> it in the sitemap? I thought about a map:error-handler, but reading
> the documentation, it only seems to handle HTTP status codes - not
> cocoon excpetions.

It's right there in the main sitemap of the sample webapp:

     <map:handle-errors>
       <map:select type="exception">

         ...
 

         <map:when test="invalid-continuation">
           <map:generate type="notifying"/>
           <map:transform src="stylesheets/system/error2html.xslt">
             <map:parameter name="contextPath" 
value="{request:contextPath}"/>
             <map:parameter name="pageTitle" value="Invalid 
Continuation"/>
           </map:transform>
           <map:serialize status-code="404"/>
         </map:when>


Ugo

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



Mime
View raw message