Announcement Announcement Module
Collapse
No announcement yet.
what is the meaning of command object and form object Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • what is the meaning of command object and form object

    what is the meaning of command object and form object
    please explain it

  • #2
    A command object is usually just a simple java bean which will be populated with the data from the form submission. As far as i know a command object and form object are used interchangeably i.e they are the same thing.

    Comment


    • #3
      help using form object

      if you take in the Object 'command'
      from the onSubmit() method in your form controller,
      and create an instance of a class [ex. Account]
      by 'Account account=(Account)command;'
      and this class implements HttpSessionBindingListener,
      must you add this class to the session or is this done automatically?

      should i call session.setAttribute("account", account) ?

      or is this automatically done since it implements HttpSessionBindingListener?
      would it add the instance of the object with variables filled in from the form?
      how could you then get the object from the session?

      Comment


      • #4
        You can configure SFC to store it's form in either the request or the session by setting the property "sessionForm" to false (default) or true.

        Comment

        Working...
        X