You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Steve Eynon <st...@alienfactory.co.uk> on 2011/10/05 05:29:04 UTC
Re: @BindParameter misses inherited parameters
Hi,
I've just run into this myself, my Mixin attaches to a Grid and needs
the rowIndex parameter from the embedded GridRows component.
Is there a JIRA number for this so I can track the changes and perhaps
patch T5.2.6?
Steve.
On 23 September 2011 20:58, Taha Hafeez Siddiqi
<ta...@gmail.com> wrote:
> Hi Dragan
>
> It definitely deserves a JIRA!
>
> regards
> Taha
>
> On Sep 23, 2011, at 6:13 PM, Dragan Sahpaski wrote:
>
>> 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.
>>
>> I'll be grateful if someone supports this and than I would be happy to
>> create a JIRA and possibly a patch for it.
>>
>> Cheers,
>> Dragan Sahpaski
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: @BindParameter misses inherited parameters
Posted by Dragan Sahpaski <dr...@gmail.com>.
Hey thanks.
Cheers,
Dragan Sahpaski
On Mon, Oct 24, 2011 at 4:35 PM, Robert Zeigler <robert.zeigler@roxanemy.com
> wrote:
> I'll try to take a look at it tonight.
>
> Robert
>
> On Oct 24, 2011, at 10/249:31 AM , Dragan Sahpaski wrote:
>
> > I have submitted a patch for
> https://issues.apache.org/jira/browse/TAP5-1663
> > .
> >
> > The patch contains integration tests and is quite short so I would be
> happy
> > if someone applies it or at least reviews it if something is
> > not quite right.
> >
> > Here is the description given with the 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.
> >
> > Cheers,
> > Dragan Sahpaski
> >
> >
> >
> > On Wed, Oct 5, 2011 at 7:41 AM, Dragan Sahpaski
> > <dr...@gmail.com>wrote:
> >
> >> Hi,
> >> Yes here is the JIRA https://issues.apache.org/jira/browse/TAP5-1663
> >>
> >> Cheers
> >>
> >>
> >> On Wed, Oct 5, 2011 at 5:29 AM, Steve Eynon <
> >> steve.eynon@alienfactory.co.uk> wrote:
> >>
> >>> Hi,
> >>>
> >>> I've just run into this myself, my Mixin attaches to a Grid and needs
> >>> the rowIndex parameter from the embedded GridRows component.
> >>>
> >>> Is there a JIRA number for this so I can track the changes and perhaps
> >>> patch T5.2.6?
> >>>
> >>> Steve.
> >>>
> >>>
> >>> On 23 September 2011 20:58, Taha Hafeez Siddiqi
> >>> <ta...@gmail.com> wrote:
> >>>> Hi Dragan
> >>>>
> >>>> It definitely deserves a JIRA!
> >>>>
> >>>> regards
> >>>> Taha
> >>>>
> >>>> On Sep 23, 2011, at 6:13 PM, Dragan Sahpaski wrote:
> >>>>
> >>>>> 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.
> >>>>>
> >>>>> I'll be grateful if someone supports this and than I would be happy
> to
> >>>>> create a JIRA and possibly a patch for it.
> >>>>>
> >>>>> Cheers,
> >>>>> Dragan Sahpaski
> >>>>
> >>>>
> >>>> ---------------------------------------------------------------------
> >>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >>>> For additional commands, e-mail: users-help@tapestry.apache.org
> >>>>
> >>>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >>> For additional commands, e-mail: users-help@tapestry.apache.org
> >>>
> >>>
> >>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
Re: @BindParameter misses inherited parameters
Posted by Robert Zeigler <ro...@roxanemy.com>.
I'll try to take a look at it tonight.
Robert
On Oct 24, 2011, at 10/249:31 AM , Dragan Sahpaski wrote:
> I have submitted a patch for https://issues.apache.org/jira/browse/TAP5-1663
> .
>
> The patch contains integration tests and is quite short so I would be happy
> if someone applies it or at least reviews it if something is
> not quite right.
>
> Here is the description given with the 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.
>
> Cheers,
> Dragan Sahpaski
>
>
>
> On Wed, Oct 5, 2011 at 7:41 AM, Dragan Sahpaski
> <dr...@gmail.com>wrote:
>
>> Hi,
>> Yes here is the JIRA https://issues.apache.org/jira/browse/TAP5-1663
>>
>> Cheers
>>
>>
>> On Wed, Oct 5, 2011 at 5:29 AM, Steve Eynon <
>> steve.eynon@alienfactory.co.uk> wrote:
>>
>>> Hi,
>>>
>>> I've just run into this myself, my Mixin attaches to a Grid and needs
>>> the rowIndex parameter from the embedded GridRows component.
>>>
>>> Is there a JIRA number for this so I can track the changes and perhaps
>>> patch T5.2.6?
>>>
>>> Steve.
>>>
>>>
>>> On 23 September 2011 20:58, Taha Hafeez Siddiqi
>>> <ta...@gmail.com> wrote:
>>>> Hi Dragan
>>>>
>>>> It definitely deserves a JIRA!
>>>>
>>>> regards
>>>> Taha
>>>>
>>>> On Sep 23, 2011, at 6:13 PM, Dragan Sahpaski wrote:
>>>>
>>>>> 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.
>>>>>
>>>>> I'll be grateful if someone supports this and than I would be happy to
>>>>> create a JIRA and possibly a patch for it.
>>>>>
>>>>> Cheers,
>>>>> Dragan Sahpaski
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: @BindParameter misses inherited parameters
Posted by Dragan Sahpaski <dr...@gmail.com>.
I have submitted a patch for https://issues.apache.org/jira/browse/TAP5-1663
.
The patch contains integration tests and is quite short so I would be happy
if someone applies it or at least reviews it if something is
not quite right.
Here is the description given with the 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.
Cheers,
Dragan Sahpaski
On Wed, Oct 5, 2011 at 7:41 AM, Dragan Sahpaski
<dr...@gmail.com>wrote:
> Hi,
> Yes here is the JIRA https://issues.apache.org/jira/browse/TAP5-1663
>
> Cheers
>
>
> On Wed, Oct 5, 2011 at 5:29 AM, Steve Eynon <
> steve.eynon@alienfactory.co.uk> wrote:
>
>> Hi,
>>
>> I've just run into this myself, my Mixin attaches to a Grid and needs
>> the rowIndex parameter from the embedded GridRows component.
>>
>> Is there a JIRA number for this so I can track the changes and perhaps
>> patch T5.2.6?
>>
>> Steve.
>>
>>
>> On 23 September 2011 20:58, Taha Hafeez Siddiqi
>> <ta...@gmail.com> wrote:
>> > Hi Dragan
>> >
>> > It definitely deserves a JIRA!
>> >
>> > regards
>> > Taha
>> >
>> > On Sep 23, 2011, at 6:13 PM, Dragan Sahpaski wrote:
>> >
>> >> 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.
>> >>
>> >> I'll be grateful if someone supports this and than I would be happy to
>> >> create a JIRA and possibly a patch for it.
>> >>
>> >> Cheers,
>> >> Dragan Sahpaski
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> > For additional commands, e-mail: users-help@tapestry.apache.org
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
Re: @BindParameter misses inherited parameters
Posted by Dragan Sahpaski <dr...@gmail.com>.
Hi,
Yes here is the JIRA https://issues.apache.org/jira/browse/TAP5-1663
Cheers
On Wed, Oct 5, 2011 at 5:29 AM, Steve Eynon
<st...@alienfactory.co.uk>wrote:
> Hi,
>
> I've just run into this myself, my Mixin attaches to a Grid and needs
> the rowIndex parameter from the embedded GridRows component.
>
> Is there a JIRA number for this so I can track the changes and perhaps
> patch T5.2.6?
>
> Steve.
>
>
> On 23 September 2011 20:58, Taha Hafeez Siddiqi
> <ta...@gmail.com> wrote:
> > Hi Dragan
> >
> > It definitely deserves a JIRA!
> >
> > regards
> > Taha
> >
> > On Sep 23, 2011, at 6:13 PM, Dragan Sahpaski wrote:
> >
> >> 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.
> >>
> >> I'll be grateful if someone supports this and than I would be happy to
> >> create a JIRA and possibly a patch for it.
> >>
> >> Cheers,
> >> Dragan Sahpaski
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>