You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by Andreas Andreou <an...@gmail.com> on 2011/02/22 13:10:40 UTC

Parameters in implementation mixins

Short version:
Why doesn't Tapestry support parameters in implementation mixins?
Is it something that's just not yet written, or is there something that would
make this infeasible?

Long version:
So, i've started doing some T5 work at last :) ... and came
across the ZoneUpdater mixin
( http://tinybits.blogspot.com/2010/03/new-and-better-zoneupdater.html )
which looks interesting and useful enough to be included in T5.

I then noticed https://issues.apache.org/jira/browse/TAP5-1415
(which is basically an unintented consequence of introducing a zone
parameter to the Select component ... makes existing zoneupdater
user code fail) which made me took a look at the zone related code in
Select. It seems to me that what happens there is just a special
case of ZoneUpdater (for instance zoneupdater can connect to
any clientside event, and it can pass extra context params).

Anyway, assuming that something like ZU is introduced as a mixin in T5,
it should be possible to remove the zone related code of Select and reuse
ZU if it wasn't for that implementation mixin limitation.

-- 
Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
Apache Tapestry PMC / http://chesstu.be owner
Open Source / JEE Consulting

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


Re: Parameters in implementation mixins

Posted by Inge Solvoll <in...@gmail.com>.
Just for the record: Please steal any code inside ZoneUpdater if you need it
:)

On Wed, Feb 23, 2011 at 4:52 PM, Andreas Andreou <an...@di.uoa.gr> wrote:

> thx, i'll try to add support for this then
>
> On Tue, Feb 22, 2011 at 19:06, Howard Lewis Ship <hl...@gmail.com> wrote:
> > On Tue, Feb 22, 2011 at 4:10 AM, Andreas Andreou <an...@gmail.com>
> wrote:
> >> Short version:
> >> Why doesn't Tapestry support parameters in implementation mixins?
> >> Is it something that's just not yet written, or is there something that
> would
> >> make this infeasible?
> >>
> >
> > Just not yet written.
> >
> >
> >> Long version:
> >> So, i've started doing some T5 work at last :) ... and came
> >> across the ZoneUpdater mixin
> >> ( http://tinybits.blogspot.com/2010/03/new-and-better-zoneupdater.html)
> >> which looks interesting and useful enough to be included in T5.
> >>
> >> I then noticed https://issues.apache.org/jira/browse/TAP5-1415
> >> (which is basically an unintented consequence of introducing a zone
> >> parameter to the Select component ... makes existing zoneupdater
> >> user code fail) which made me took a look at the zone related code in
> >> Select. It seems to me that what happens there is just a special
> >> case of ZoneUpdater (for instance zoneupdater can connect to
> >> any clientside event, and it can pass extra context params).
> >>
> >> Anyway, assuming that something like ZU is introduced as a mixin in T5,
> >> it should be possible to remove the zone related code of Select and
> reuse
> >> ZU if it wasn't for that implementation mixin limitation.
> >>
> >> --
> >> Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
> >> Apache Tapestry PMC / http://chesstu.be owner
> >> Open Source / JEE Consulting
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> >> For additional commands, e-mail: dev-help@tapestry.apache.org
> >>
> >>
> >
> >
> >
> > --
> > Howard M. Lewis Ship
> >
> > Creator of Apache Tapestry
> >
> > The source for Tapestry training, mentoring and support. Contact me to
> > learn how I can get you up and productive in Tapestry fast!
> >
> > (971) 678-5210
> > http://howardlewisship.com
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: dev-help@tapestry.apache.org
> >
> >
>
>
>
> --
>  Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
> Apache Tapestry PMC / http://chesstu.be owner
> Open Source / JEE Consulting
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: dev-help@tapestry.apache.org
>
>

Re: Parameters in implementation mixins

Posted by Andreas Andreou <an...@di.uoa.gr>.
ok, i get what you're sayin but that phrazze in the docs is misleading
I really thought that implementation mixins don't get their parameters
bound at all.
I would suggest changing "Note that Tapestry currently doesn't support
parameters in implementation mixins." to something like
"Note that Tapestry implementation mixins get their parameters bound
from those specified in the containing component" but that also is the case
with Instance mixins... so, not sure...perhaps another suggestion there?


On Mon, Feb 28, 2011 at 06:11, Howard Lewis Ship <hl...@gmail.com> wrote:
> I think what that comment is getting it as that when you define an
> implementation mixin, and the mixin has parameters, there's no way to
> bind those parameters as part of the implementation. They simply
> become available when the composite component (including the mixin) is
> introduced into a page.
>
> On Sun, Feb 27, 2011 at 6:57 PM, Andreas Andreou <an...@di.uoa.gr> wrote:
>> So, i only just took a look at EmbeddedComponentAssemblerImpl
>> which seems to be the place that does the mixin assembly and i noticed
>> there's not
>> much difference with how implementation and instance mixins are registered.
>>
>> That got me thinking and i figured there's no visible reason why
>> implementation mixins
>> can't use parameters - so, i created a quick test and indeed
>> parameters work (both in
>> 5.3.0-SNASHOT and 5.2.4).
>>
>> That basicaly means that the docs at
>> http://tapestry.apache.org/component-mixins.html
>> are incorrect (or that the phrase
>> "Note that Tapestry currently doesn't support parameters in
>> implementation mixins"
>> refers to something else??)
>>
>> Interestingly, the 5.1.0.5 docs at
>> http://tapestry.apache.org/tapestry5/guide/mixins.html
>> don't mention any such limitation!
>>
>> Finally, https://issues.apache.org/jira/browse/TAP5-13 was resolved at
>> some point and can
>> now safely be closed.
>>
>> I'll go on and update the docs and jira in a day or two...
>>
>> On Wed, Feb 23, 2011 at 17:52, Andreas Andreou <an...@di.uoa.gr> wrote:
>>> thx, i'll try to add support for this then
>>>
>>> On Tue, Feb 22, 2011 at 19:06, Howard Lewis Ship <hl...@gmail.com> wrote:
>>>> On Tue, Feb 22, 2011 at 4:10 AM, Andreas Andreou <an...@gmail.com> wrote:
>>>>> Short version:
>>>>> Why doesn't Tapestry support parameters in implementation mixins?
>>>>> Is it something that's just not yet written, or is there something that would
>>>>> make this infeasible?
>>>>>
>>>>
>>>> Just not yet written.
>>>>
>>>>
>>>>> Long version:
>>>>> So, i've started doing some T5 work at last :) ... and came
>>>>> across the ZoneUpdater mixin
>>>>> ( http://tinybits.blogspot.com/2010/03/new-and-better-zoneupdater.html )
>>>>> which looks interesting and useful enough to be included in T5.
>>>>>
>>>>> I then noticed https://issues.apache.org/jira/browse/TAP5-1415
>>>>> (which is basically an unintented consequence of introducing a zone
>>>>> parameter to the Select component ... makes existing zoneupdater
>>>>> user code fail) which made me took a look at the zone related code in
>>>>> Select. It seems to me that what happens there is just a special
>>>>> case of ZoneUpdater (for instance zoneupdater can connect to
>>>>> any clientside event, and it can pass extra context params).
>>>>>
>>>>> Anyway, assuming that something like ZU is introduced as a mixin in T5,
>>>>> it should be possible to remove the zone related code of Select and reuse
>>>>> ZU if it wasn't for that implementation mixin limitation.
>>>>>
>>>>> --
>>>>> Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
>>>>> Apache Tapestry PMC / http://chesstu.be owner
>>>>> Open Source / JEE Consulting
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
>>>>> For additional commands, e-mail: dev-help@tapestry.apache.org
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Howard M. Lewis Ship
>>>>
>>>> Creator of Apache Tapestry
>>>>
>>>> The source for Tapestry training, mentoring and support. Contact me to
>>>> learn how I can get you up and productive in Tapestry fast!
>>>>
>>>> (971) 678-5210
>>>> http://howardlewisship.com
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
>>>> For additional commands, e-mail: dev-help@tapestry.apache.org
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
>>> Apache Tapestry PMC / http://chesstu.be owner
>>> Open Source / JEE Consulting
>>>
>>
>>
>>
>> --
>> Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
>> Apache Tapestry PMC / http://chesstu.be owner
>> Open Source / JEE Consulting
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: dev-help@tapestry.apache.org
>>
>>
>
>
>
> --
> Howard M. Lewis Ship
>
> Creator of Apache Tapestry
>
> The source for Tapestry training, mentoring and support. Contact me to
> learn how I can get you up and productive in Tapestry fast!
>
> (971) 678-5210
> http://howardlewisship.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: dev-help@tapestry.apache.org
>
>



-- 
Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
Apache Tapestry PMC / http://chesstu.be owner
Open Source / JEE Consulting

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


Re: Parameters in implementation mixins

Posted by Howard Lewis Ship <hl...@gmail.com>.
I think what that comment is getting it as that when you define an
implementation mixin, and the mixin has parameters, there's no way to
bind those parameters as part of the implementation. They simply
become available when the composite component (including the mixin) is
introduced into a page.

On Sun, Feb 27, 2011 at 6:57 PM, Andreas Andreou <an...@di.uoa.gr> wrote:
> So, i only just took a look at EmbeddedComponentAssemblerImpl
> which seems to be the place that does the mixin assembly and i noticed
> there's not
> much difference with how implementation and instance mixins are registered.
>
> That got me thinking and i figured there's no visible reason why
> implementation mixins
> can't use parameters - so, i created a quick test and indeed
> parameters work (both in
> 5.3.0-SNASHOT and 5.2.4).
>
> That basicaly means that the docs at
> http://tapestry.apache.org/component-mixins.html
> are incorrect (or that the phrase
> "Note that Tapestry currently doesn't support parameters in
> implementation mixins"
> refers to something else??)
>
> Interestingly, the 5.1.0.5 docs at
> http://tapestry.apache.org/tapestry5/guide/mixins.html
> don't mention any such limitation!
>
> Finally, https://issues.apache.org/jira/browse/TAP5-13 was resolved at
> some point and can
> now safely be closed.
>
> I'll go on and update the docs and jira in a day or two...
>
> On Wed, Feb 23, 2011 at 17:52, Andreas Andreou <an...@di.uoa.gr> wrote:
>> thx, i'll try to add support for this then
>>
>> On Tue, Feb 22, 2011 at 19:06, Howard Lewis Ship <hl...@gmail.com> wrote:
>>> On Tue, Feb 22, 2011 at 4:10 AM, Andreas Andreou <an...@gmail.com> wrote:
>>>> Short version:
>>>> Why doesn't Tapestry support parameters in implementation mixins?
>>>> Is it something that's just not yet written, or is there something that would
>>>> make this infeasible?
>>>>
>>>
>>> Just not yet written.
>>>
>>>
>>>> Long version:
>>>> So, i've started doing some T5 work at last :) ... and came
>>>> across the ZoneUpdater mixin
>>>> ( http://tinybits.blogspot.com/2010/03/new-and-better-zoneupdater.html )
>>>> which looks interesting and useful enough to be included in T5.
>>>>
>>>> I then noticed https://issues.apache.org/jira/browse/TAP5-1415
>>>> (which is basically an unintented consequence of introducing a zone
>>>> parameter to the Select component ... makes existing zoneupdater
>>>> user code fail) which made me took a look at the zone related code in
>>>> Select. It seems to me that what happens there is just a special
>>>> case of ZoneUpdater (for instance zoneupdater can connect to
>>>> any clientside event, and it can pass extra context params).
>>>>
>>>> Anyway, assuming that something like ZU is introduced as a mixin in T5,
>>>> it should be possible to remove the zone related code of Select and reuse
>>>> ZU if it wasn't for that implementation mixin limitation.
>>>>
>>>> --
>>>> Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
>>>> Apache Tapestry PMC / http://chesstu.be owner
>>>> Open Source / JEE Consulting
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
>>>> For additional commands, e-mail: dev-help@tapestry.apache.org
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Howard M. Lewis Ship
>>>
>>> Creator of Apache Tapestry
>>>
>>> The source for Tapestry training, mentoring and support. Contact me to
>>> learn how I can get you up and productive in Tapestry fast!
>>>
>>> (971) 678-5210
>>> http://howardlewisship.com
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: dev-help@tapestry.apache.org
>>>
>>>
>>
>>
>>
>> --
>> Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
>> Apache Tapestry PMC / http://chesstu.be owner
>> Open Source / JEE Consulting
>>
>
>
>
> --
> Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
> Apache Tapestry PMC / http://chesstu.be owner
> Open Source / JEE Consulting
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: dev-help@tapestry.apache.org
>
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


Re: Parameters in implementation mixins

Posted by Andreas Andreou <an...@di.uoa.gr>.
So, i only just took a look at EmbeddedComponentAssemblerImpl
which seems to be the place that does the mixin assembly and i noticed
there's not
much difference with how implementation and instance mixins are registered.

That got me thinking and i figured there's no visible reason why
implementation mixins
can't use parameters - so, i created a quick test and indeed
parameters work (both in
5.3.0-SNASHOT and 5.2.4).

That basicaly means that the docs at
http://tapestry.apache.org/component-mixins.html
are incorrect (or that the phrase
"Note that Tapestry currently doesn't support parameters in
implementation mixins"
refers to something else??)

Interestingly, the 5.1.0.5 docs at
http://tapestry.apache.org/tapestry5/guide/mixins.html
don't mention any such limitation!

Finally, https://issues.apache.org/jira/browse/TAP5-13 was resolved at
some point and can
now safely be closed.

I'll go on and update the docs and jira in a day or two...

On Wed, Feb 23, 2011 at 17:52, Andreas Andreou <an...@di.uoa.gr> wrote:
> thx, i'll try to add support for this then
>
> On Tue, Feb 22, 2011 at 19:06, Howard Lewis Ship <hl...@gmail.com> wrote:
>> On Tue, Feb 22, 2011 at 4:10 AM, Andreas Andreou <an...@gmail.com> wrote:
>>> Short version:
>>> Why doesn't Tapestry support parameters in implementation mixins?
>>> Is it something that's just not yet written, or is there something that would
>>> make this infeasible?
>>>
>>
>> Just not yet written.
>>
>>
>>> Long version:
>>> So, i've started doing some T5 work at last :) ... and came
>>> across the ZoneUpdater mixin
>>> ( http://tinybits.blogspot.com/2010/03/new-and-better-zoneupdater.html )
>>> which looks interesting and useful enough to be included in T5.
>>>
>>> I then noticed https://issues.apache.org/jira/browse/TAP5-1415
>>> (which is basically an unintented consequence of introducing a zone
>>> parameter to the Select component ... makes existing zoneupdater
>>> user code fail) which made me took a look at the zone related code in
>>> Select. It seems to me that what happens there is just a special
>>> case of ZoneUpdater (for instance zoneupdater can connect to
>>> any clientside event, and it can pass extra context params).
>>>
>>> Anyway, assuming that something like ZU is introduced as a mixin in T5,
>>> it should be possible to remove the zone related code of Select and reuse
>>> ZU if it wasn't for that implementation mixin limitation.
>>>
>>> --
>>> Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
>>> Apache Tapestry PMC / http://chesstu.be owner
>>> Open Source / JEE Consulting
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: dev-help@tapestry.apache.org
>>>
>>>
>>
>>
>>
>> --
>> Howard M. Lewis Ship
>>
>> Creator of Apache Tapestry
>>
>> The source for Tapestry training, mentoring and support. Contact me to
>> learn how I can get you up and productive in Tapestry fast!
>>
>> (971) 678-5210
>> http://howardlewisship.com
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: dev-help@tapestry.apache.org
>>
>>
>
>
>
> --
> Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
> Apache Tapestry PMC / http://chesstu.be owner
> Open Source / JEE Consulting
>



-- 
Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
Apache Tapestry PMC / http://chesstu.be owner
Open Source / JEE Consulting

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


Re: Parameters in implementation mixins

Posted by Andreas Andreou <an...@di.uoa.gr>.
thx, i'll try to add support for this then

On Tue, Feb 22, 2011 at 19:06, Howard Lewis Ship <hl...@gmail.com> wrote:
> On Tue, Feb 22, 2011 at 4:10 AM, Andreas Andreou <an...@gmail.com> wrote:
>> Short version:
>> Why doesn't Tapestry support parameters in implementation mixins?
>> Is it something that's just not yet written, or is there something that would
>> make this infeasible?
>>
>
> Just not yet written.
>
>
>> Long version:
>> So, i've started doing some T5 work at last :) ... and came
>> across the ZoneUpdater mixin
>> ( http://tinybits.blogspot.com/2010/03/new-and-better-zoneupdater.html )
>> which looks interesting and useful enough to be included in T5.
>>
>> I then noticed https://issues.apache.org/jira/browse/TAP5-1415
>> (which is basically an unintented consequence of introducing a zone
>> parameter to the Select component ... makes existing zoneupdater
>> user code fail) which made me took a look at the zone related code in
>> Select. It seems to me that what happens there is just a special
>> case of ZoneUpdater (for instance zoneupdater can connect to
>> any clientside event, and it can pass extra context params).
>>
>> Anyway, assuming that something like ZU is introduced as a mixin in T5,
>> it should be possible to remove the zone related code of Select and reuse
>> ZU if it wasn't for that implementation mixin limitation.
>>
>> --
>> Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
>> Apache Tapestry PMC / http://chesstu.be owner
>> Open Source / JEE Consulting
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: dev-help@tapestry.apache.org
>>
>>
>
>
>
> --
> Howard M. Lewis Ship
>
> Creator of Apache Tapestry
>
> The source for Tapestry training, mentoring and support. Contact me to
> learn how I can get you up and productive in Tapestry fast!
>
> (971) 678-5210
> http://howardlewisship.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: dev-help@tapestry.apache.org
>
>



-- 
Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
Apache Tapestry PMC / http://chesstu.be owner
Open Source / JEE Consulting

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


Re: Parameters in implementation mixins

Posted by Howard Lewis Ship <hl...@gmail.com>.
On Tue, Feb 22, 2011 at 4:10 AM, Andreas Andreou <an...@gmail.com> wrote:
> Short version:
> Why doesn't Tapestry support parameters in implementation mixins?
> Is it something that's just not yet written, or is there something that would
> make this infeasible?
>

Just not yet written.


> Long version:
> So, i've started doing some T5 work at last :) ... and came
> across the ZoneUpdater mixin
> ( http://tinybits.blogspot.com/2010/03/new-and-better-zoneupdater.html )
> which looks interesting and useful enough to be included in T5.
>
> I then noticed https://issues.apache.org/jira/browse/TAP5-1415
> (which is basically an unintented consequence of introducing a zone
> parameter to the Select component ... makes existing zoneupdater
> user code fail) which made me took a look at the zone related code in
> Select. It seems to me that what happens there is just a special
> case of ZoneUpdater (for instance zoneupdater can connect to
> any clientside event, and it can pass extra context params).
>
> Anyway, assuming that something like ZU is introduced as a mixin in T5,
> it should be possible to remove the zone related code of Select and reuse
> ZU if it wasn't for that implementation mixin limitation.
>
> --
> Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
> Apache Tapestry PMC / http://chesstu.be owner
> Open Source / JEE Consulting
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: dev-help@tapestry.apache.org
>
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org