You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Dragan Sahpaski (JIRA)" <ji...@apache.org> on 2011/09/23 15:17:27 UTC

[jira] [Created] (TAP5-1663) The @BindParameter annotation should support inherited parameters

The @BindParameter annotation should support inherited parameters
-----------------------------------------------------------------

                 Key: TAP5-1663
                 URL: https://issues.apache.org/jira/browse/TAP5-1663
             Project: Tapestry 5
          Issue Type: Improvement
            Reporter: Dragan Sahpaski
            Priority: Minor


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.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (TAP5-1663) The @BindParameter annotation should support inherited parameters

Posted by "Dragan Sahpaski (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-1663?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dragan Sahpaski updated TAP5-1663:
----------------------------------

    Comment: was deleted

(was: This patch is rather small (entire patch file is 253 lines long), and contains integration tests.

Patch Summary:
Files changed 4:
 1. BindParameterWorker: Here is the main logic for inspecting published parameters. Also the Exception text is changed to contain info that formal and published parameters are searched.
 2. BindParameterDemo.java
 3. BindParameterDemo.tml - Added publish1 component with EchoValueWithId mixin.
 4. CoreBehaviorsTests.java
   -  public void bindparameter() - added few assertions for detecting if the published value is there. It is the same concept as the EchoValue mixins
   -  public void bindparameter_nomatchingparameter() - changed asserted value of  the exception text.

Files added 1:
 1. EchoValueWithId mixin in integration/app1: Same as EchoValue mixin except it does take id as a parameter and doesn't use the container's clientId. This is needed because it is applied to a Publish1 component that is not a clientElement.

Public API changes: none
Internal API changes: none

Performance issues:
 - BindParameterWorker has a recursive search (iterative implementation) for published parameters in embeddedComponents. I think this is better than changing public and internal interfaces to contain metadata for published parameters etc.
A alternative implementation would be to put this metadata in ComponentModel, something like isPublishedParameter or getPublishedParameters. I think this is not necessary especially because no one has issued a need for it.)
    
> The @BindParameter annotation should support inherited parameters
> -----------------------------------------------------------------
>
>                 Key: TAP5-1663
>                 URL: https://issues.apache.org/jira/browse/TAP5-1663
>             Project: Tapestry 5
>          Issue Type: Improvement
>            Reporter: Dragan Sahpaski
>            Priority: Minor
>              Labels: mixin
>         Attachments: TAP5-1663.patch
>
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (TAP5-1663) The @BindParameter annotation should support inherited parameters

Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-1663?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13135134#comment-13135134 ] 

Hudson commented on TAP5-1663:
------------------------------

Integrated in tapestry-trunk-freestyle #606 (See [https://builds.apache.org/job/tapestry-trunk-freestyle/606/])
    TAP5-1663: The @BindParameter annotation should support inherited. Add missing file for the test.
TAP5-1663: The @BindParameter annotation should support inherited parameters

robertdzeigler : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1188660
Files : 
* /tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/mixins/EchoValueWithId.java

robertdzeigler : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1188655
Files : 
* /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/BindParameterWorker.java
* /tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/CoreBehaviorsTests.java
* /tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/BindParameterDemo.java
* /tapestry/tapestry5/trunk/tapestry-core/src/test/resources/org/apache/tapestry5/integration/app1/pages/BindParameterDemo.tml

                
> The @BindParameter annotation should support inherited parameters
> -----------------------------------------------------------------
>
>                 Key: TAP5-1663
>                 URL: https://issues.apache.org/jira/browse/TAP5-1663
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-core
>            Reporter: Dragan Sahpaski
>            Assignee: Robert Zeigler
>            Priority: Minor
>              Labels: mixin
>             Fix For: 5.3
>
>         Attachments: TAP5-1663.patch
>
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (TAP5-1663) The @BindParameter annotation should support inherited parameters

Posted by "Dragan Sahpaski (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-1663?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dragan Sahpaski updated TAP5-1663:
----------------------------------

    Comment: was deleted

(was: This patch is rather small (entire patch file is 253 lines long), and contains integration tests.

Patch Summary:
Files changed 4:
 1. BindParameterWorker: Here is the main logic for inspecting published parameters. Also the Exception text is changed to contain info that formal and published parameters are searched.
 2. BindParameterDemo.java
 3. BindParameterDemo.tml - Added publish1 component with EchoValueWithId mixin.
 4. CoreBehaviorsTests.java
   -  public void bindparameter() - added few assertions for detecting if the published value is there. It is the same concept as the EchoValue mixins
   -  public void bindparameter_nomatchingparameter() - changed asserted value of  the exception text.

Files added 1:
 1. EchoValueWithId mixin in integration/app1: Same as EchoValue mixin except it does take id as a parameter and doesn't use the container's clientId. This is needed because it is applied to a Publish1 component that is not a clientElement.

Public API changes: none
Internal API changes: none

Performance issues:
 - BindParameterWorker has a recursive search (iterative implementation) for published parameters in embeddedComponents. I think this is better than changing public and internal interfaces to contain metadata for published parameters etc.
A alternative implementation would be to put this metadata in ComponentModel, something like isPublishedParameter or getPublishedParameters. I think this is not necessary especially because no one has issued a need for it.)
    
> The @BindParameter annotation should support inherited parameters
> -----------------------------------------------------------------
>
>                 Key: TAP5-1663
>                 URL: https://issues.apache.org/jira/browse/TAP5-1663
>             Project: Tapestry 5
>          Issue Type: Improvement
>            Reporter: Dragan Sahpaski
>            Priority: Minor
>              Labels: mixin
>         Attachments: TAP5-1663.patch
>
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Closed] (TAP5-1663) The @BindParameter annotation should support inherited parameters

Posted by "Robert Zeigler (Closed) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-1663?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Zeigler closed TAP5-1663.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 5.3

Thanks for the patch by Dragan.
                
> The @BindParameter annotation should support inherited parameters
> -----------------------------------------------------------------
>
>                 Key: TAP5-1663
>                 URL: https://issues.apache.org/jira/browse/TAP5-1663
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-core
>            Reporter: Dragan Sahpaski
>            Assignee: Robert Zeigler
>            Priority: Minor
>              Labels: mixin
>             Fix For: 5.3
>
>         Attachments: TAP5-1663.patch
>
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (TAP5-1663) The @BindParameter annotation should support inherited parameters

Posted by "Dragan Sahpaski (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-1663?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13134089#comment-13134089 ] 

Dragan Sahpaski commented on TAP5-1663:
---------------------------------------

This patch is rather small (entire patch file is 253 lines long), and contains integration tests.

Patch Summary:
Files changed 4:
 1. BindParameterWorker: Here is the main logic for inspecting published parameters. Also the Exception text is changed to contain info that formal and published parameters are searched.
 2. BindParameterDemo.java
 3. BindParameterDemo.tml - Added publish1 component with EchoValueWithId mixin.
 4. CoreBehaviorsTests.java
   -  public void bindparameter() - added few assertions for detecting if the published value is there. It is the same concept as the EchoValue mixins
   -  public void bindparameter_nomatchingparameter() - changed asserted value of  the exception text.

Files added 1:
 1. EchoValueWithId mixin in integration/app1: Same as EchoValue mixin except it does take id as a parameter and doesn't use the container's clientId. This is needed because it is applied to a Publish1 component that is not a clientElement.

Public API changes: none
Internal API changes: none

Performance issues:
 - BindParameterWorker has a recursive search (iterative implementation) for published parameters in embeddedComponents. I think this is better than changing public and internal interfaces to contain metadata for published parameters etc.
A alternative implementation would be to put this metadata in ComponentModel, something like isPublishedParameter or getPublishedParameters. I think this is not necessary especially because no one has issued a need for it.
                
> The @BindParameter annotation should support inherited parameters
> -----------------------------------------------------------------
>
>                 Key: TAP5-1663
>                 URL: https://issues.apache.org/jira/browse/TAP5-1663
>             Project: Tapestry 5
>          Issue Type: Improvement
>            Reporter: Dragan Sahpaski
>            Priority: Minor
>              Labels: mixin
>         Attachments: TAP5-1663.patch
>
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (TAP5-1663) The @BindParameter annotation should support inherited parameters

Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-1663?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13135134#comment-13135134 ] 

Hudson commented on TAP5-1663:
------------------------------

Integrated in tapestry-trunk-freestyle #606 (See [https://builds.apache.org/job/tapestry-trunk-freestyle/606/])
    TAP5-1663: The @BindParameter annotation should support inherited. Add missing file for the test.
TAP5-1663: The @BindParameter annotation should support inherited parameters

robertdzeigler : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1188660
Files : 
* /tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/mixins/EchoValueWithId.java

robertdzeigler : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1188655
Files : 
* /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/BindParameterWorker.java
* /tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/CoreBehaviorsTests.java
* /tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/BindParameterDemo.java
* /tapestry/tapestry5/trunk/tapestry-core/src/test/resources/org/apache/tapestry5/integration/app1/pages/BindParameterDemo.tml

                
> The @BindParameter annotation should support inherited parameters
> -----------------------------------------------------------------
>
>                 Key: TAP5-1663
>                 URL: https://issues.apache.org/jira/browse/TAP5-1663
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-core
>            Reporter: Dragan Sahpaski
>            Assignee: Robert Zeigler
>            Priority: Minor
>              Labels: mixin
>             Fix For: 5.3
>
>         Attachments: TAP5-1663.patch
>
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Closed] (TAP5-1663) The @BindParameter annotation should support inherited parameters

Posted by "Robert Zeigler (Closed) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-1663?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Zeigler closed TAP5-1663.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 5.3

Thanks for the patch by Dragan.
                
> The @BindParameter annotation should support inherited parameters
> -----------------------------------------------------------------
>
>                 Key: TAP5-1663
>                 URL: https://issues.apache.org/jira/browse/TAP5-1663
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-core
>            Reporter: Dragan Sahpaski
>            Assignee: Robert Zeigler
>            Priority: Minor
>              Labels: mixin
>             Fix For: 5.3
>
>         Attachments: TAP5-1663.patch
>
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (TAP5-1663) The @BindParameter annotation should support inherited parameters

Posted by "Robert Zeigler (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-1663?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Zeigler updated TAP5-1663:
---------------------------------

    Component/s: tapestry-core
       Assignee: Robert Zeigler
    
> The @BindParameter annotation should support inherited parameters
> -----------------------------------------------------------------
>
>                 Key: TAP5-1663
>                 URL: https://issues.apache.org/jira/browse/TAP5-1663
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-core
>            Reporter: Dragan Sahpaski
>            Assignee: Robert Zeigler
>            Priority: Minor
>              Labels: mixin
>         Attachments: TAP5-1663.patch
>
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (TAP5-1663) The @BindParameter annotation should support inherited parameters

Posted by "Dragan Sahpaski (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-1663?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dragan Sahpaski updated TAP5-1663:
----------------------------------

    Attachment: TAP5-1663.patch

This patch is rather small (entire patch file is 253 lines long), and contains integration tests. 

Patch Summary: 
Files changed 4: 
 1. BindParameterWorker: Here is the main logic for inspecting published parameters. Also the Exception text is changed to contain info that formal and published parameters are searched. 
 2. BindParameterDemo.java 
 3. BindParameterDemo.tml - Added publish1 component with EchoValueWithId mixin. 
 4. CoreBehaviorsTests.java 
   - public void bindparameter() - added few assertions for detecting if the published value is there. It is the same concept as the EchoValue mixins 
   - public void bindparameter_nomatchingparameter() - changed asserted value of the exception text. 

Files added 1: 
 1. EchoValueWithId mixin in integration/app1: Same as EchoValue mixin except it does take id as a parameter and doesn't use the container's clientId. This is needed because it is applied to a Publish1 component that is not a clientElement. 

Public API changes: none 
Internal API changes: none 

Performance issues: 
 - BindParameterWorker has a recursive search (iterative implementation) for published parameters in embeddedComponents. I think this is better than changing public and internal interfaces to contain metadata for published parameters etc. 
A alternative implementation would be to put this metadata in ComponentModel, something like isPublishedParameter or getPublishedParameters. I think this is not necessary especially because no one has issued a need for it.
                
> The @BindParameter annotation should support inherited parameters
> -----------------------------------------------------------------
>
>                 Key: TAP5-1663
>                 URL: https://issues.apache.org/jira/browse/TAP5-1663
>             Project: Tapestry 5
>          Issue Type: Improvement
>            Reporter: Dragan Sahpaski
>            Priority: Minor
>              Labels: mixin
>         Attachments: TAP5-1663.patch
>
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (TAP5-1663) The @BindParameter annotation should support inherited parameters

Posted by "Robert Zeigler (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-1663?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Zeigler updated TAP5-1663:
---------------------------------

    Component/s: tapestry-core
       Assignee: Robert Zeigler
    
> The @BindParameter annotation should support inherited parameters
> -----------------------------------------------------------------
>
>                 Key: TAP5-1663
>                 URL: https://issues.apache.org/jira/browse/TAP5-1663
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-core
>            Reporter: Dragan Sahpaski
>            Assignee: Robert Zeigler
>            Priority: Minor
>              Labels: mixin
>         Attachments: TAP5-1663.patch
>
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (TAP5-1663) The @BindParameter annotation should support inherited parameters

Posted by "Dragan Sahpaski (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-1663?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13134089#comment-13134089 ] 

Dragan Sahpaski commented on TAP5-1663:
---------------------------------------

This patch is rather small (entire patch file is 253 lines long), and contains integration tests.

Patch Summary:
Files changed 4:
 1. BindParameterWorker: Here is the main logic for inspecting published parameters. Also the Exception text is changed to contain info that formal and published parameters are searched.
 2. BindParameterDemo.java
 3. BindParameterDemo.tml - Added publish1 component with EchoValueWithId mixin.
 4. CoreBehaviorsTests.java
   -  public void bindparameter() - added few assertions for detecting if the published value is there. It is the same concept as the EchoValue mixins
   -  public void bindparameter_nomatchingparameter() - changed asserted value of  the exception text.

Files added 1:
 1. EchoValueWithId mixin in integration/app1: Same as EchoValue mixin except it does take id as a parameter and doesn't use the container's clientId. This is needed because it is applied to a Publish1 component that is not a clientElement.

Public API changes: none
Internal API changes: none

Performance issues:
 - BindParameterWorker has a recursive search (iterative implementation) for published parameters in embeddedComponents. I think this is better than changing public and internal interfaces to contain metadata for published parameters etc.
A alternative implementation would be to put this metadata in ComponentModel, something like isPublishedParameter or getPublishedParameters. I think this is not necessary especially because no one has issued a need for it.
                
> The @BindParameter annotation should support inherited parameters
> -----------------------------------------------------------------
>
>                 Key: TAP5-1663
>                 URL: https://issues.apache.org/jira/browse/TAP5-1663
>             Project: Tapestry 5
>          Issue Type: Improvement
>            Reporter: Dragan Sahpaski
>            Priority: Minor
>              Labels: mixin
>         Attachments: TAP5-1663.patch
>
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (TAP5-1663) The @BindParameter annotation should support inherited parameters

Posted by "Dragan Sahpaski (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-1663?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dragan Sahpaski updated TAP5-1663:
----------------------------------

    Attachment: TAP5-1663.patch

This patch is rather small (entire patch file is 253 lines long), and contains integration tests. 

Patch Summary: 
Files changed 4: 
 1. BindParameterWorker: Here is the main logic for inspecting published parameters. Also the Exception text is changed to contain info that formal and published parameters are searched. 
 2. BindParameterDemo.java 
 3. BindParameterDemo.tml - Added publish1 component with EchoValueWithId mixin. 
 4. CoreBehaviorsTests.java 
   - public void bindparameter() - added few assertions for detecting if the published value is there. It is the same concept as the EchoValue mixins 
   - public void bindparameter_nomatchingparameter() - changed asserted value of the exception text. 

Files added 1: 
 1. EchoValueWithId mixin in integration/app1: Same as EchoValue mixin except it does take id as a parameter and doesn't use the container's clientId. This is needed because it is applied to a Publish1 component that is not a clientElement. 

Public API changes: none 
Internal API changes: none 

Performance issues: 
 - BindParameterWorker has a recursive search (iterative implementation) for published parameters in embeddedComponents. I think this is better than changing public and internal interfaces to contain metadata for published parameters etc. 
A alternative implementation would be to put this metadata in ComponentModel, something like isPublishedParameter or getPublishedParameters. I think this is not necessary especially because no one has issued a need for it.
                
> The @BindParameter annotation should support inherited parameters
> -----------------------------------------------------------------
>
>                 Key: TAP5-1663
>                 URL: https://issues.apache.org/jira/browse/TAP5-1663
>             Project: Tapestry 5
>          Issue Type: Improvement
>            Reporter: Dragan Sahpaski
>            Priority: Minor
>              Labels: mixin
>         Attachments: TAP5-1663.patch
>
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira