model-view-controller

  1. C

    Is there a better way cancel the current request and redirect to an error page in Rails?

    Frequently when I'm dealing with controllers I have found the need to stop the current action and then show an error page. Currently I have a method to show my error page in application controller: class ApplicationController < ActionController::Base def show_error msg render file...
  2. S

    How to disable button during ajax request

    So I have a razor form and I want to disable a button during ajax request. Also I want to be able to send only one request to controller - (disable any flood attempt) This is my html: <div class="row"> <div class="col-md-8 col-md-offset-2"> @using...
  3. H

    Issue with redirect in ModelAndView in Spring MVC

    I have a simple index page and controller. I just want my controller to redirect to the index page if the credentials of user doesn't match. I'm using ModelAndView as my return type in the controller. Here's my code for the controller: public class LoginController {...
Top