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

The @BindParameter annotation should support inherited parameters

    Details

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

      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

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

              Dates

              • Created:
                Updated:
                Resolved: