Class SplibGeneral2FormsController<F1 extends SplibGeneralForm, F2 extends SplibGeneralForm, S extends SplibGeneral2FormsService<F1,F2>>

Type Parameters:
F1 - SplibGeneralForm
F2 - SplibGeneralForm
S - SplibGeneralService
Direct Known Subclasses:
SplibSearchListController

public abstract class SplibGeneral2FormsController<F1 extends SplibGeneralForm, F2 extends SplibGeneralForm, S extends SplibGeneral2FormsService<F1,F2>> extends SplibGeneralController<S>
Is the abstract general controller with 2 Forms.
  • Constructor Details

    • SplibGeneral2FormsController

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

      protected SplibGeneral2FormsController(@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, F1 form1, F2 form2, @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
      form1 - form
      form2 - 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, F1 form1, F2 form2, @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
      form1 - form
      form2 - form
      loginUser - loginUser
      Returns:
      html page
      Throws:
      Exception - Exception