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

The @BindParameter annotation should support inherited parameters

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 5.3
    • tapestry-core

    Description

      Hi,
      Currently the @BindParameter annotation (that binds a parameter of a mixin to a parameter in the component the mixin is applied to),
      can be applied only to formal parameters of the containing component and not to parameters that are inherited by the containing component by embedded components.
      I think it is natural that inherited parameters are included in the search for parameters to bind to with the @BindParameter annotation.
      Here is a motivating example:

      public class MyComponent{
      @Component(parameters = "blankOption=inherit:blankOption", publishParameters="blankOption")
      private Select select;
      }

      public class MyMixin{
      @BindParameter
      private BlankOption blankOption;
      }

      And we get:

      org.apache.tapestry5.ioc.util.UnknownValueException
      Containing component MyComponent does not contain a formal parameter matching any of (blank), blankOption.

      Attachments

        1. TAP5-1663.patch
          11 kB
          Dragan Sahpaski

        Activity

          People

            ongakugainochi Robert Zeigler
            dragan.sahpaski Dragan Sahpaski
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: