Results 1 to 2 of 2

Thread: Login Form Best Practices

  1. #1

    Default Login Form Best Practices

    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

  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,448
    Answers
    3997

    Default

    You just need to use the submit method on the underlying Basic form..


    Code:
    form.getForm.submit();
    It uses an Ajax call to send to the url
    Mitchell Simoens @LikelyMitch

    Check out my GitHub:
    https://github.com/mitchellsimoens

    Posts are my own, not any current, past or future employer's.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •