Click
  1. Click
  2. CLK-279

Improve Form submit check to handle multiple forms per page

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      The Form's javadoc states the following:

      Please Note the Form submit check currently only supports having one for per Page.

      This issue is to remove that restriction.

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        10d 2h 40m 1 Bob Schellink 17/Jan/08 11:04
        Resolved Resolved Closed Closed
        24d 17h 10m 1 Malcolm Edgar 11/Feb/08 04:15
        Henri Yandell made changes -
        Project Import Fri Mar 20 14:11:32 PDT 2009 [ 1237583492744 ]
        Malcolm Edgar made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Bob Schellink made changes -
        Resolution Fixed [ 1 ]
        Status Open [ 1 ] Resolved [ 5 ]
        Hide
        Bob Schellink added a comment -

        fixed will be available in Click1.4 RC3

        Show
        Bob Schellink added a comment - fixed will be available in Click1.4 RC3
        Hide
        Bob Schellink added a comment -

        I notice in the example (will commit it tomorrow) the value of both SUBMIT_CHECK HiddenFields are the same. Since the value is timestamp based both onSubmitChecks are called in the same millisecond.

        I doubt this is a problem since the SUBMIT_CHECK key is still unique to the page.

        Show
        Bob Schellink added a comment - I notice in the example (will commit it tomorrow) the value of both SUBMIT_CHECK HiddenFields are the same. Since the value is timestamp based both onSubmitChecks are called in the same millisecond. I doubt this is a problem since the SUBMIT_CHECK key is still unique to the page.
        Hide
        Malcolm Edgar added a comment -

        Hi Bob,

        Sounds like a good strategy. However, as the name is not an argument I would use an IllegalStateException.

        regards Malcolm

        Show
        Malcolm Edgar added a comment - Hi Bob, Sounds like a good strategy. However, as the name is not an argument I would use an IllegalStateException. regards Malcolm
        Hide
        Bob Schellink added a comment -

        Created an example with 2 forms and a formTable. Seems fine. Will upload this example under the "Forms" menu.

        Just wondering why you do not throw an IllegalArgumentException in performSubmitCheck(...) if name is null?

        If a nameless form calls onSubmitCheck the token would contain the null name. If multiple nameless forms called onSubmitCheck the tokens would clash in the session.

        Show
        Bob Schellink added a comment - Created an example with 2 forms and a formTable. Seems fine. Will upload this example under the "Forms" menu. Just wondering why you do not throw an IllegalArgumentException in performSubmitCheck(...) if name is null? If a nameless form calls onSubmitCheck the token would contain the null name. If multiple nameless forms called onSubmitCheck the tokens would clash in the session.
        Hide
        Malcolm Edgar added a comment -

        Hi Bob,

        Please resolve this item, when you are happy with your testing.

        regards Malcolm

        Show
        Malcolm Edgar added a comment - Hi Bob, Please resolve this item, when you are happy with your testing. regards Malcolm
        Hide
        Bob Schellink added a comment -

        I have tested this with two forms. Will also test with 2 forms and a tableForm.

        Show
        Bob Schellink added a comment - I have tested this with two forms. Will also test with 2 forms and a tableForm.
        Hide
        Malcolm Edgar added a comment -

        Patch looks good, and have checked this into SVN.

        I have tested this with one page, have you tried this with multiple forms? We will probably need to add an example page to click-examples.

        regards Malcolm Edgar

        Show
        Malcolm Edgar added a comment - Patch looks good, and have checked this into SVN. I have tested this with one page, have you tried this with multiple forms? We will probably need to add an example page to click-examples. regards Malcolm Edgar
        Bob Schellink made changes -
        Attachment Form.java.patch [ 10332 ]
        Hide
        Bob Schellink added a comment -

        Hi Malcolm

        When you have some time, can you review the patch please.

        Thanks

        Show
        Bob Schellink added a comment - Hi Malcolm When you have some time, can you review the patch please. Thanks
        Malcolm Edgar made changes -
        Field Original Value New Value
        Assignee Malcolm Edgar [ medgar ] Bob Schellink [ sabob ]
        Bob Schellink created issue -

          People

          • Assignee:
            Bob Schellink
            Reporter:
            Bob Schellink
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development