Announcement Announcement Module
Collapse
No announcement yet.
Custome Form in Roo issue Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Custome Form in Roo issue

    Hi,

    I have created new page in the folder where all the scaffolded pages are present.

    I have added new method in the controller to load the form attribute.

    @RequestMapping(params = "formView", method = RequestMethod.GET)
    public String viewConfigForm(Model uiModel) {
    uiModel.addAttribute("list", Person.findAllPersons());
    return "persons/viewConfig";
    }

    Page loads successfully but when I submit the form, every time Create method is called.

    My form is having POST method

    Please Suggest.

    Thanks,
    Rohit.

  • #2
    You submit a form (which in general is a POST not a GET) and next to that your url should have the attribute formView filled. If not this method isn't going to be called.

    Comment


    • #3
      Hi Marten,

      Thanks for the reply,

      Actually this code is for loading the form in which i am passing the data to be loaded when form loads.

      Now I want to submit the form to different action/method i.e locatePerson.

      @RequestMapping(value = "locatePerson\formView", method = RequestMethod.POST)
      public String locatePerson(Model uiModel, HttpServletRequest httpServletRequest) {
      }

      I am calling the url "locatePerson\formView" from my action but Create method get called every time.
      I mapped "locatePerson\formView" in my views.xml also.

      Please Suggest,

      Thanks,
      Rohit

      Comment

      Working...
      X