Tapestry
  1. Tapestry
  2. TAPESTRY-1780

T5 Form component NPE if no FORM_DATA found

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 5.0.5
    • Fix Version/s: 5.0.11
    • Component/s: Core Components
    • Labels:
      None

      Description

      if no FORM_DATA is found in a request, form component throws NPE in onAction(..) handler. it's quite easy to reproduce, just hit the http://my-webapp/mypage.form url.

        Activity

        Hide
        Howard M. Lewis Ship added a comment -

        Fix mixed in with the Ajax Form support.

        Show
        Howard M. Lewis Ship added a comment - Fix mixed in with the Ajax Form support.
        Hide
        Howard M. Lewis Ship added a comment -

        This will be addresses shortly, as with Ajax there will be a variable number of t:form query parameter values.

        Show
        Howard M. Lewis Ship added a comment - This will be addresses shortly, as with Ajax there will be a variable number of t:form query parameter values.
        Hide
        Robert Zeigler added a comment -

        I'm not sure I would call this issue "minor".
        I've seen multiple users hit this issue now, on a variety of forms where they end up trying to refresh the data and things break.
        I like Dan.s idea of redirecting to the owning page. Maybe form could add the check for null form data, and if it's null, add a message to the set of form errors, something regarding "form was submitted without data" and then kick back to the owning page. That would at least get the user back to teh form they were originally trying to submit, in a "responsible" state, with some informative message, rather than the app just blowing up.

        Show
        Robert Zeigler added a comment - I'm not sure I would call this issue "minor". I've seen multiple users hit this issue now, on a variety of forms where they end up trying to refresh the data and things break. I like Dan.s idea of redirecting to the owning page. Maybe form could add the check for null form data, and if it's null, add a message to the set of form errors, something regarding "form was submitted without data" and then kick back to the owning page. That would at least get the user back to teh form they were originally trying to submit, in a "responsible" state, with some informative message, rather than the app just blowing up.
        Hide
        Howard M. Lewis Ship added a comment -

        We don't define a fix version until a fix is committed.

        Show
        Howard M. Lewis Ship added a comment - We don't define a fix version until a fix is committed.
        Hide
        Daniel Gredler added a comment -

        Any ideas on how this should be handled? It's easy enough to check for the condition and throw a TapestryException rather than a NPE, but that's not very user-friendly. As Janko says, this is easily reproduceable by doing a GET request on a form's action URL. My feeling is that this will happen enough in the real world, in deployed applications, that we need to redirect to the owning page or something. Thoughts?

        Show
        Daniel Gredler added a comment - Any ideas on how this should be handled? It's easy enough to check for the condition and throw a TapestryException rather than a NPE, but that's not very user-friendly. As Janko says, this is easily reproduceable by doing a GET request on a form's action URL. My feeling is that this will happen enough in the real world, in deployed applications, that we need to redirect to the owning page or something. Thoughts?

          People

          • Assignee:
            Howard M. Lewis Ship
            Reporter:
            Michal Buczko
          • Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development