Announcement Announcement Module
Collapse
No announcement yet.
what is the actual use of function isFormSubmission() Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • what is the actual use of function isFormSubmission()

    I have some confusion in understanding the action use of function isFormSubmission(). Does it similar to function isPostBack in dot net. I tried few example on net, but no one is that much sufficient to remove my confusion. Can anyone tell me the actual use of that and refer me some example.

    my problem is like this. Just for example, I have two jsp pages. First one is userLogin.jsp and second is modules.jsp. When i submit data from the userLogin.jsp and all go right, i am to move for second page on success. when the controller of second page will be executed the function isFormSubmission available in that will return true or false.

    Please help me, i will be very thankful.

  • #2
    Hi,

    the isFormSubmission method is used by the framework to find out whether the user has submitted the form or not, by default (SFC)it looks at the http method and if the http method is post , the logic starts processing the form .

    you could definitely override this, for example when using display tag for pagination on a success page of a SFC,

    the isFormSubmission is also used in the AWC, this uses a different logic to ascertain in addition to the above logic(POST) if the user's intent is a form submission,

    SimpleFormController is used for the following pattern,

    1) user clicks on a link or keys in the address in the address bar

    result : show the form to the user.
    HTTP Method: GET

    2) user key in the input in the form and click on Submit

    result: a success page or an acknowledgement page
    HTTP Method : POST

    Use the PRG pattern as a best practice for the above usage.

    Comment

    Working...
    X