PDA

View Full Version : Login Form Best Practices



adamBetterment
15 Mar 2012, 1:43 PM
I'm just starting out with Ext JS 4, and I'm building a RESTful application. I need to have an ajax login where our controller on the backend takes in a userName and password and simply sends back a cookie with the session ID so that it can be used to authenticate on subsequent requests against our RESTful server.

What is the best way to setup this communication with our server, I already have a panel with a form with two textfields. do I need an ajax proxy? How do I connect the form submission? with a button and a controller or the form's onSubmit? Should the button be in the Panel or in the form?

I can't give too much detail because I really don't understand where to go from here. Anything at all would be appreciated

mitchellsimoens
16 Mar 2012, 11:32 AM
You just need to use the submit method on the underlying Basic form..



form.getForm.submit();

It uses an Ajax call to send to the url