Class WrapperController
java.lang.Object
com.iu.javadatastructureslab.controller.WrapperController
Handles wrapper class demonstration requests.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongenerateWrapperDemo(String name, String age, String email, String balance, String active, org.springframework.ui.Model model) Generates wrapper demo data from form input.wrappers(org.springframework.ui.Model model) Renders the wrapper demo with a default sample customer.
-
Constructor Details
-
WrapperController
public WrapperController()
-
-
Method Details
-
wrappers
Renders the wrapper demo with a default sample customer.- Parameters:
model- model used to expose view attributes- Returns:
- the wrapper view name
-
generateWrapperDemo
@PostMapping("/wrapper/generate") public String generateWrapperDemo(@RequestParam String name, @RequestParam String age, @RequestParam String email, @RequestParam String balance, @RequestParam String active, org.springframework.ui.Model model) Generates wrapper demo data from form input.- Parameters:
name- customer nameage- age input textemail- email input textbalance- balance input textactive- active input textmodel- model used to expose view attributes- Returns:
- the wrapper view name
-