app/controllers/UserController.java
/**
     * To Domonstrate the PUT verb I have to use Ajax
     * Buttons and form only support Get & POST.
     * User is deleted by username which is still sent by Ajax
     * as a parameter in the URL. Not in Json.
     */
To Domonstrate the PUT verb I have to use Ajax
Buttons and form only support Get & POST.
User is deleted by username which is still sent by Ajax
as a parameter in the URL. Not in Json.
To Domonstrate the PUT verb I have to use Ajax Buttons and form only support Get & POST . User is deleted by username which is still sent by Ajax as a parameter in the URL . Not in Json .
public Result editUser(String username){
        Long id;
        User user = null;
        id = User.EditUser(username);
        if(id != 0) {
            Form<User> editForm = formFactory.form(User.class).fill(User.find.byId(id));
            return ok(views.html.editForm.render(editForm, "Update User:", id, username));
        }
        return(badRequest());
    }
public Result editUser ( String username ) { Long id ; User user = null ; id = User . EditUser ( username ) ; if ( id != 0 ) { Form < User > editForm = formFactory . form ( User . class ) . fill ( User . find . byId ( id ) ) ; return ok ( views . html . editForm . render ( editForm , "Update User:" , id , username ) ) ; } return ( badRequest ( ) ) ; }
To Domonstrate the PUT verb I have to use Ajax
 Buttons and form only support Get & POST.
To Domonstrate the PUT verb I have to use Ajax Buttons and form only support Get & POST .