Uploaded image for project: 'Tapestry 5'
  1. Tapestry 5
  2. TAP5-2301

Select needs a context to properly participate in AJAX pages

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 5.3, 5.4
    • None
    • tapestry-core

    Description

      This is a request to bring Select into line with Form, EventLink, and ActionLink, which already have a context.

      There are two issues:
      1. Currently a containing component, C, can't handle 2 or more AJAX Select components. When one Select sends an event, C has no idea of the value of the other. A context would be a good place to carry this info.
      2. A deeply nested component, C, cannot handle an event from an AJAX sub-component unless C can reconstruct its context, ie. C has to be able to restore its parameters. A context would allow this.

      This issue was discussed more fully in "Discussion on all AJAX requests needing context": http://apache-tapestry-mailing-list-archives.1045711.n5.nabble.com/Discussion-on-all-AJAX-requests-needing-context-tt5726132.html

      I propose that server-side, Select triggers a new event with the context parameters before it triggers ON_VALUE_CHANGED, e.g..

      @Parameter
      private Integer myParameter;

      public void onPrepareFromMySelect(Integer myParameter, String otherSelectsValue) {
      this.myParameter = myParameter;
      this. otherSelectsValue = otherSelectsValue;
      }

      public void onValueChangedFromMySelect(Integer myChoice) {
      // Do something then return zone(s).
      }

      Grid needs a context too but it looks like I'm not authorised to tag it as a related issue: https://issues.apache.org/jira/browse/TAP5-2297 .

      Attachments

        Issue Links

          Activity

            People

              thiagohp Thiago Henrique De Paula Figueiredo
              geoffcallender Geoff Callender
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: