Class WrapperController

java.lang.Object
com.iu.javadatastructureslab.controller.WrapperController

@Controller public class WrapperController extends Object
Handles wrapper class demonstration requests.
  • Constructor Details

    • WrapperController

      public WrapperController()
  • Method Details

    • wrappers

      @GetMapping("/wrapper") public String wrappers(org.springframework.ui.Model model)
      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 name
      age - age input text
      email - email input text
      balance - balance input text
      active - active input text
      model - model used to expose view attributes
      Returns:
      the wrapper view name