Sylvain Wallez wrote:
Hi, I will try to give you an explanation of how it can be done :黄 海冬 wrote: 1. the pipeline called by the coplet containing the form is something like this : <map:match pattern="myForm"> <map:select type="request-method"> <map:when test="GET"> <map:call function="MyFlowFunctionThatCreateAndDisplayTheForm"> </map:when> <map:otherwise> <map:call continuation="{request-param:continuation-id}"/> </map:otherwise> </map:select </map:select> 2. the pipeline showing the form is somewhat like this : <map:patch pattern="showMyForm"> <map:generate type="jx" src=""/> <map:transform type="browser-update"/> <map:transform type="i18n" label='i18n'> <map:parameter name="locale" value="{session-context:authentication/authentication/data/lang}"/> </map:transform> <map:transform src="" label='forms-xsl'> <map:parameter name="contextPath" value="{request:contextPath}"/> <map:parameter name="lang" value="{session-context:authentication/authentication/data/lang}"/> </map:transform> <map:select type="request-parameter"> <map:parameter name="parameter-name" value="cocoon-ajax"/> <map:when test="true"> <map:serialize type="xml"/> </map:when> <map:otherwise> <map:serialize type='xhtml'/> </map:otherwise> </map:select> </map:match> 3. In the template : <ft:form-template action="" enctype="multipart/form-data" method="POST" ajax="true" ajax-action=""/> Note : - I assume that these pipeline are in the portal sitemap. If not, just modify ajax-action - We do not use the temporary attribute "application-uri". (the uri of the coplet is always cocoon://portal/myForm in this case) I think that's all. Good luck ! -- Philippe GASSMANN ANYWARE TECHNOLOGIES http://www.anyware-tech.com/ |
- Re: portal+cform+ajax problem in 2.1.8 rc1 Philippe Gassmann
