Class SplibGeneral2FormsController<F1 extends SplibGeneralForm, F2 extends SplibGeneralForm, S extends SplibGeneral2FormsService<F1,F2>>
- Type Parameters:
F1- SplibGeneralFormF2- SplibGeneralFormS- SplibGeneralService
- Direct Known Subclasses:
SplibSearchListController
-
Nested Class Summary
Nested classes/interfaces inherited from class SplibGeneralController
SplibGeneralController.ControllerContext -
Field Summary
Fields inherited from class SplibGeneralController
context, paramListOnRedirectToSelf, redirectUrlOnAppExceptionBean, rolesAndAuthoritiesBean, serviceListFields inherited from class SplibBaseController
request -
Constructor Summary
ConstructorsModifierConstructorDescriptionSplibGeneral2FormsController(String function) Construct a new instance withfunction.protectedSplibGeneral2FormsController(String function, SplibGeneralController.ControllerContext settings) Construct a new instance withfunction,settings. -
Method Summary
Modifier and TypeMethodDescriptionpage(org.springframework.ui.Model model, F1 form1, F2 form2, org.springframework.security.core.userdetails.UserDetails loginUser) Provides the default method to show page.submitOnChangeToRefresh(org.springframework.ui.Model model, F1 form1, F2 form2, org.springframework.security.core.userdetails.UserDetails loginUser) Provides the default method to refresh selections of the dropdowns, and so on.Methods inherited from class SplibGeneralController
addParamToParamListOnRedirectToSelf, addParamToParamListOnRedirectToSelf, getDefaultDestPageOnAbnormalEnd, getDefaultDestPageOnNormalEnd, getDefaultDestSubFunctionOnAbnormalEnd, getDefaultDestSubFunctionOnNormalEnd, getDefaultHtmlPageName, getFunction, getFunctionKinds, getParamListOnRedirectToSelf, getRedirectUrlOnAppExceptionBean, getRedirectUrlOnSuccess, getRootRecordName, getService, getSubFunction, newContext, prepare, prepare, redirectToSamePageTakingOverModel, redirectToSamePageTakingOverModelMethods inherited from class SplibBaseController
initBinder
-
Constructor Details
-
SplibGeneral2FormsController
Construct a new instance withfunction.- Parameters:
function- function
-
SplibGeneral2FormsController
protected SplibGeneral2FormsController(@Nonnull String function, @NonNull SplibGeneralController.ControllerContext settings) Construct a new instance withfunction,settings.- Parameters:
function- functionsettings- 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
POSTmethod, this method also receivesPOSTmethod. (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- modelform1- formform2- formloginUser- 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
POSTmethod, this method also receivesPOSTmethod. (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- modelform1- formform2- formloginUser- loginUser- Returns:
- html page
- Throws:
Exception- Exception
-