Class SplibGeneral1FormController<F extends SplibGeneralForm, S extends SplibGeneral1FormService<F>>

Type Parameters:
F - SplibGeneralForm
S - SplibGeneralService
Direct Known Subclasses:
AdminLoginController, ConfigController, LoginController, SplibEditController

public abstract class SplibGeneral1FormController<F extends SplibGeneralForm, S extends SplibGeneral1FormService<F>> extends SplibGeneralController<S>
Is the abstract general controller with 1 Form.
  • Constructor Details

    • SplibGeneral1FormController

      public SplibGeneral1FormController(@Nonnull String function)
      Construct a new instance with function.
      Parameters:
      function - function
    • SplibGeneral1FormController

      protected SplibGeneral1FormController(@Nonnull String function, @NonNull SplibGeneralController.ControllerContext settings)
      Construct a new instance with function, settings.
      Parameters:
      function - function
      settings - settings
  • Method Details

    • page

      @RequestMapping(value="page", method={GET,POST}) public String page(org.springframework.ui.Model model, F form, @AuthenticationPrincipal org.springframework.security.core.userdetails.UserDetails loginUser) throws Exception
      Provides the default method to show page.

      Since Occuring an system error is not prefereble when this method is accessed with POST method, this method also receives POST method. (It happens mostly By being redirected the POST request to this page. (like accessing to the login needed page but the session timed out)

      Parameters:
      model - model
      form - form
      loginUser - loginUser
      Returns:
      URL
      Throws:
      Exception - Exception
    • submitOnChangeToRefresh

      @RequestMapping(value="action", params="submitOnChangeToRefresh=true", method={GET,POST}) public String submitOnChangeToRefresh(org.springframework.ui.Model model, F form, @AuthenticationPrincipal org.springframework.security.core.userdetails.UserDetails loginUser) throws Exception
      Provides the default method to refresh selections of the dropdowns, and so on.

      This is called in the following situation.
      There are two dropdowns, one of them (A) has selections of the names of prefectures, and others (B) the names of cities.
      When A is selected, refresh the selections of B which names belongs to prefecture A.
      To realize this, page should be submitted when A is selected, but not validated since it's stile in the middle of the input a form.

      Since Occuring an system error is not prefereble when this method is accessed with POST method, this method also receives POST method. (It happens mostly By being redirected the POST request to this page. (like accessing to the login needed page but the session timed out)

      Parameters:
      model - model
      form - form
      loginUser - loginUser
      Returns:
      html page
      Throws:
      Exception - Exception