Results 1 to 2 of 2

Thread: Newbie question - how to add parameters to the form

  1. #1

    Question Newbie question - how to change ModelAttribute data

    Hi all,
    When a method annotated with ModelAttribute the return data that will be bounded to a form:
    @ModelAttribute("someName")
    public List getSomeList(){

    }

    What is the correct way to access "someList" during from different method

    Newbie question - how to change ModelAttribute data
    say:

    Code:
    @RequestMapping(method = RequestMethod.GET)
    public ModelAndView setUpForm(){
                ModelAndView modelAndView =  new ModelAndView("driverForm");
    	modelAndView.addObject("driver",driver);
           //  change the list value here
    	return modelAndView;
    }
    Last edited by shark; Apr 27th, 2011 at 04:08 AM. Reason: rephrase question

  2. #2

    Default

    Please advise, Thank you!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •