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

Annotation for managing a property as the page activation context

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 5.0.11
    • 5.0.14
    • tapestry-core
    • None

    Description

      A very common idiom is to have a page that exists to view/edit/create an entity, and to store the entity as the page activation context (relying on a ValueEncoder to extract the primary key as the value in the URL). Example code:

      public class ShowAccount
      {
      @GenerateAccessors
      private Account _account;

      void onActivate(Account account)

      { _account = account; }

      Object onPassivate()

      { return _account; }

      }

      It seems that these two methods could be generated automatically in some way, i.e.

      public class ShowAccount
      {
      @GenerateAccessors
      @PageActivationContext
      private Account _account;
      }

      Attachments

        Activity

          People

            igor.drobiazko Igor Drobiazko
            hlship Howard Lewis Ship
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: