Tapestry 5
  1. Tapestry 5
  2. TAP5-1190

New page-level events to "decorate" component event and page render links

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 5.2.0
    • Fix Version/s: 5.2.0
    • Component/s: tapestry-core
    • Labels:
      None

      Description

      This is based on some customer work.

      Customer really wanted URLs to include a series of (optional) values as query parameters, not path info ... which makes sense, because you'd have a category filter sometimes, a name filter sometimes, etc.

      Anyway, this worked fine in most cases ... there's a method on the page to act like the passivate event handler, but return a Link with the query parameters added. The active event handler would extract the query parameters and store them inside fields.

      Got trickier handling event links; had to modify some low-level components to fire a "decorateLink" event so that the page's event handler could add the query parameters to the link.

      It would be nice if these concepts were inside Tapestry; that after generating a Link via the passivate event (or by building a Link using a supplied page activation context) that an optional event (perhaps called "decorateLink") would be triggered to add these extra query parameters.

      Ideally, there would be two events, "decoratePageRenderLink" and "decorateComponentEventLink". The first parameter would be the Link to decorate. The second would be the PageRenderRequestParameters or ComponentEventRequestParameters, as appropriate. This would give the event handler method enough information to decide whether to decorate the link, and what information to put into it.

        Activity

        Howard M. Lewis Ship created issue -
        Howard M. Lewis Ship made changes -
        Field Original Value New Value
        Assignee Howard M. Lewis Ship [ hlship ]
        Howard M. Lewis Ship made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Howard M. Lewis Ship made changes -
        Status In Progress [ 3 ] Closed [ 6 ]
        Fix Version/s 5.2.0 [ 12314122 ]
        Resolution Fixed [ 1 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development