Spring Controller
I have some portlet application that have implemented by Springframework.
I suppose to use Extjs for client UI.
1. I want to submit my form in Extjs to Controller in spring, like my form in view.jsp is apply to controller without Extjs.
2. The controller return ModelAndView that contain Map of return objects. I need this objects in view.jsp. Could i continue returning ModelAndView to the client by DWR?
I know that DWR+spring can help me to apply some facade in the server, but i want that the Extjs form will submit to my controllers (or to dispacher that refer to controller) or something like this in the spring (server).
My problem is that i don't want change my spring server code for implementing Extjs UI.
Some sample code:
view.jsp
Above form submit to following controller.
TestController:
public class TestController extends SimpleFormController{
protected Object formBackingObject(PortletRequest request) throws Exception {
return super.formBackingObject(request);
}
protected void onSubmitAction(ActionRequest request,
ActionResponse response, Object command, BindException errors) throws Exception
{
}
protected ModelAndView onSubmitRender(RenderRequest request,
RenderResponse response, Object command, BindException errors) throws Exception
{
/*
* if success view needs the command object, onSubmitRender is implemented
* and the command object is placed back on
*/
ModelAndView modelAndView = new ModelAndView(getSuccessView(), "formObj", command);
return modelAndView;
}
}
You can find more details here: http://extjs.com/deploy/dev/docs/?class=Ext.form.FormPanel
#If you have any other info about this subject , Please add it free.# |

