cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Messing, Elad" <>
Subject AW: AW: AW: WG: CFORMS validation unexplained behavior - call for help!
Date Wed, 08 Jun 2005 07:03:58 GMT
Thank you Reinhard, for you answer !
I understand, so this is typical "Back" behavior. It makes sense.

However - Still the 3rd issue I mentioned occurs:  
 And the third issue - When I am not using the "Back" button, 
 but instead using the original "link" to the form page, I get other 
 - I can see the form in the state it was after I entered a "too-short" 
 string in the text field !! This is after I have already changed the 
 data to valid, submitted, got my results, and return to the form page 
 using its link 1 minute after.. I even get the results opening a new 
 browser window, in a different process. Only "restart" to the web 
 server removes it. 

Is this cache as well ? This time - server cache ? Or maybe something else ? How can I check
it ?

Thank you again !!


-----Urspr√ľngliche Nachricht-----
Von: Reinhard Poetz [] 
Gesendet: Mittwoch, 8. Juni 2005 08:54
Betreff: Re: AW: AW: WG: CFORMS validation unexplained behavior - call for help!

Messing, Elad wrote:
> Sorry - my mistake. Here goes :
> *********************************************
> URL "XXX.form" -> resolves in sitemap to :
>         <map:match pattern="*.form">
>           <!-- CForm (makred by the .form ending) redirected to a flow script function
with the same name -->
>           <map:call function="handleForm{1}"/>
>         </map:match>
> *********************************************
> Flowscript :
> function handleFormXXX() {
>     var data = {restTypeList: getRestTypes()};
>     var form = new Form("forms/xxx_main_search.xml");
>     form.showForm("/template/forms/xxx_main_search.xhtml", data);
>     var model = form.getModel();
>     var results = new Object();
>     results.model = getModelSearchResults(, model.type);
>     cocoon.sendPage("/template/dynamic/xxx_results.jx", { "results": 
> results });
> }
> *********************************************
> template/forms/xxx_main_search.xhtml in the sitemap again :
>         <map:match pattern="forms/**">
>           <!-- This will handle CForms. It is called after a flowscript, and delegate
to a xhtml file, with <ft:form-template tag to hold the form. Then it applies the form
>           <map:generate src="content/{1}"/>
>           <map:transform type="forms"/>
>           <map:transform src="stylesheets/system/forms-samples-styling.xsl"/>
>           <map:serialize type="xhtml"/>
>         </map:match>
> *********************************************
> Hope this is all the info you need. If something is missing - let me know and I will
add it quickly.
> Thank you again for your patience!

Your flowscript looks good to me. Also the behaviour that hitting the back-button leads to
a page showing the errors and the correct values is caused by the nature of web browsers as
the page before was showing the errors. Have a look at the logs and you'll see that there
hasn't been any server request. You can watch the same effect at samples/blocks/forms/form1.flow.

If you want to change this I'd look at response headers related to caching and maybe you should
have a look at Note,
AFAIK this hasn't been implemented with Flowscript yet, but it should be feasible.

Reinhard Pötz           Independent Consultant, Trainer & (IT)-Coach 

{Software Engineering, Open Source, Web Applications, Apache Cocoon}


To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message