roy huang wrote: > Hi,all: > I am trying implement an application using CForm with Ajax.Now I have a > problem: > When form submit(using submit widget),the form will entirely refresh and > display the result,just like samples in form block.I just want to using Ajax > to make the entire process don't refresh.Here's my thought: > 1.Use action widget instead of submit widget > 2.Like multipage sample,I can use a fd:group to show the result > But this will get several problems > A.action widget won't validate form's value,submit widget will. > B.in form define <on-action>,how can I get binding and other object in > parent flowscript?If put this object in global the same people access twice > or more at the same continuation life cycle will cause problem. > > Any suggestion? >
In Ajax mode, a submit widget doesn't necessarily lead to a full page refresh. The request for the submit widget is sent asynchronously, and the page is refreshed only if we exit form.showForm(), i.e. the form is valid. If the form is not valid, then partial page update instructions are sent just like for any other action. However, there are some widget that don't support Ajax, such as file upload. Do you have an upload in your form? Sylvain -- Sylvain Wallez Anyware Technologies http://bluxte.net http://www.anyware-tech.com Apache Software Foundation Member Research & Technology Director
