Tapestry
  1. Tapestry
  2. TAPESTRY-1599

Make it possible to differentiate between preparing for a Form render vs. preparing for a Form submission

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 5.0.5
    • Fix Version/s: 5.0.8
    • Component/s: tapestry-core
    • Labels:
      None

      Description

      (I'm top posting over our previous correspondence below.)

      My initial response would be that the optional context parameters signature is
      very natural and that prepending a boolean would dilute the current API's clarity.

      Do these events need to share the same name? It smacks of the rewind.
      (Not to malign what was, at the time, a great idea.)

      Cheers,
      Nick.

      Howard Lewis Ship wrote:
      > I could change Form to pass along a boolean indicating whether it was
      > for render or for submit. Please add an issue to JIRA.
      >
      > On 6/22/07, Nick Westgate <nick@key-planning.co.jp> wrote:
      >> Hi.
      >>
      >> Does anyone see a way to differentiate these prepare events?
      >> I'm using an ugly hack because I can't find another way.
      >>
      >> boolean rendering;
      >>
      >> void setupRender()
      >>

      { >> rendering = true; >> }

      >>
      >> public void onPrepareFromHistoryItemForm(int index)
      >> {
      >> if (rendering)
      >>

      { >> ... >> }

      >> }
      >>
      >> Cheers,
      >> Nick.

        Activity

          People

          • Assignee:
            Howard M. Lewis Ship
            Reporter:
            Nick Westgate
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development