Announcement Announcement Module
Collapse
No announcement yet.
Thank u uaine;But a small clarrification regarding formBackingObject() Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Thank u uaine;But a small clarrification regarding formBackingObject()

    Thank u for ur reply uaine;

    But a small clarrification.Actually Form submission is a 2 stage process(form viewing and form submitting) in spring MVC.

    Is it the same formBackingObject() method that is called both times that is during form viewing and form submission.So in the first stage(form viewing) spring creates command bean object and puts the command bean object in session and again during form submission spring retrieves the command object from session and bind the request parameters on command bean.

    But it is given that (in Experts Spring MVC and WebFlow) that,we can use the formBackingObject()method to configure if necessary the form object class possibly setting any dependencies or properties.This is the time to manipulate the form object before it ends the workflow.

    What actually the author is trying to convey.Does it mean that if we want we can provide initial values to the attributes of command bean so that those values could be displayed when the form is shown to the user or get the data from database and assign it to attributes of command bean and show them as default values to the user when the form is shown first time to the user.

    And also what does author mean by saying any dependencies.Does it mean that say for example if we have Member Command Bean which cantains Name as attribute which is again a separate java type.So we have to explicitly set the Name into Member Command bean like getMember.setName("xcv") in formBackingObject() method.

    Thanks in Advance
Working...
X