Hi Simone,
Basically my problem is that after setting ajax="true" in my ft:form-template and defining my jx-macros line:
<jx:import uri="resource://org/apache/cocoon/forms/generation/jx-macros.xml"/>
<tableR>
<ft:form-template action="" id="Form1" method="POST" ajax="true">
and in my sitemap doing:
1. <map:transformer name="browser-update" src="" in map:transformers and:
2. <map:selector name="ajax-request" src="" org.apache.cocoon.ajax.AjaxRequestSelector"/> in my map:selectors
and my pipeline being defined as so:
<map:match pattern="**viewform-*">
<map:generate type="jx" src=""
<map:transform type="browser-update"/>
<map:transform type="forms"/>
<map:transform type="i18n">
<map:parameter name="locale" value="en-US"/>
</map:transform>
<map:transform src=""> <map:transform type="cinclude"/>
<map:transform type="xslt-saxon" src=""
<map:transform type="cinclude"/>
<map:transform type="i18n">
<map:parameter name="locale" value="en-US"/>
</map:transform>
<map:select type="ajax-request">
<map:when test="true">
<map:serialize type="xml"/>
</map:when>
<map:otherwise>
<map:serialize type="xhtml"/>
</map:otherwise>
</map:select>
</map:match>
when the form is submitted the ajax-request never resolves to true, it always fails and picks up the xhtml serializer, which leads me to believe that ajax is not happening, am I right? If so, what could be the cause of the problem and how do I resolve it? My flow snippet is as follows:
var form = new Form("forms/CreditCardDetails_.xml");
//Load in credit card page
form.showForm("viewform-CreditCardDetails", {"userGlobal":userGlobal});
I gained all the above information from the cocoon wiki concerning ajax implementation:
http://cocoon.apache.org/2.1/userdocs/ajax.html
regards
Basically my problem is that after setting ajax="true" in my ft:form-template and defining my jx-macros line:
<jx:import uri="resource://org/apache/cocoon/forms/generation/jx-macros.xml"/>
<tableR>
<ft:form-template action="" id="Form1" method="POST" ajax="true">
and in my sitemap doing:
1. <map:transformer name="browser-update" src="" in map:transformers and:
2. <map:selector name="ajax-request" src="" org.apache.cocoon.ajax.AjaxRequestSelector"/> in my map:selectors
and my pipeline being defined as so:
<map:match pattern="**viewform-*">
<map:generate type="jx" src=""
<map:transform type="browser-update"/>
<map:transform type="forms"/>
<map:transform type="i18n">
<map:parameter name="locale" value="en-US"/>
</map:transform>
<map:transform src=""> <map:transform type="cinclude"/>
<map:transform type="xslt-saxon" src=""
<map:transform type="cinclude"/>
<map:transform type="i18n">
<map:parameter name="locale" value="en-US"/>
</map:transform>
<map:select type="ajax-request">
<map:when test="true">
<map:serialize type="xml"/>
</map:when>
<map:otherwise>
<map:serialize type="xhtml"/>
</map:otherwise>
</map:select>
</map:match>
when the form is submitted the ajax-request never resolves to true, it always fails and picks up the xhtml serializer, which leads me to believe that ajax is not happening, am I right? If so, what could be the cause of the problem and how do I resolve it? My flow snippet is as follows:
var form = new Form("forms/CreditCardDetails_.xml");
//Load in credit card page
form.showForm("viewform-CreditCardDetails", {"userGlobal":userGlobal});
I gained all the above information from the cocoon wiki concerning ajax implementation:
http://cocoon.apache.org/2.1/userdocs/ajax.html
regards
Andrew
