Uploaded image for project: 'Tapestry'
  1. Tapestry
  2. TAPESTRY-1457

No way for PageLink to distinguish between an explicitly empty page activate context and normal delegation to the target page's passivate event

    Details

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

      Description

      It isn't possible to set an empty context using 'contex' parameter of PageLink. It always treats null and zero length array/list in the same way - asks the page about its activation context via onPassivate. I think that only null should trigger onPassivate.

      Example

      <a t:type="PageLink" page="test" context="context">page link</a>

      public Object[] getContext()
      {
      if (test == 0)
      return new Object[]

      {"1", "2"}

      ; // context will be ../test/1/2
      else
      if (test == 1)
      return new Object[0]; // onPassivate will be asked but context should be empty IMO
      else
      return null; // onPassivate will be asked, ok
      }

        Attachments

          Activity

            People

            • Assignee:
              hlship Howard M. Lewis Ship
              Reporter:
              pv Peter
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: