You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by kranga <kr...@k2d2.org> on 2008/05/09 16:52:53 UTC

T5: Calling method with parameter in prop

In looking at converting from T3 to T5, I've to deal with constructs such 
as:

class="ognl:menuClassName('home')"  where getMenuClassName uses the 
parameter to compare with the page's "id" passed in to determine if this is 
the currentPage or not. So the template has multiple links with constructs 
such as:

class="ognl:menuClassName('about')"
class="ognl:menuClassName('contact')" etc.

How do I do this in T5 given that prop bindings to methods cannot accept 
arguments? I'm sure there is a workaround, I just can't seem to find one. 


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


Re: T5: Calling method with parameter in prop

Posted by Josh Canfield <jo...@thedailytube.com>.
On Tue, May 13, 2008 at 2:21 AM, Blower, Andy
<An...@proquest.co.uk> wrote:
> This should be done with care though IMO. To me, one big advantage of T5 over JSP's with
> EL or OGNL is that you are forced to keep the logic out of the templates for the most part.
> Simple comparisons and single parameter accessors seem okay, but I've always been
> surprised when seeing people on the list want full OGNL functionality. Maybe I've had too
> many issues with overcomplicated JSP's that have subsequently been broken by designers
> over the years to want to the temptation any more... lol.

Yeah, I'd agree with that. Getting code out of the templates is a good
thing. Let the framework allow for OGNL type extensions to be built as
add-ons. Turning them into first class core features will encourage
people to use them...


>
> > -----Original Message-----
> > From: Howard Lewis Ship [mailto:hlship@gmail.com]
> > Sent: 12 May 2008 21:59
> > To: Tapestry users
> > Subject: Re: T5: Calling method with parameter in prop
> >
> > Mor expression language would be great; the pain is when you pull
> > values out of a Map  or Collection and lose their type, at which point
> > you also lose annotations and components such as BeanEditor and Grid
> > no longer operate as expected.
> >
> > But I agree that having a few boolean operators in the expression
> > language would be great: eq, lt, gt, gteq, lteq, etc.
> >
> > On Mon, May 12, 2008 at 2:26 AM, Andreas Pardeike <ap...@fsys.se> wrote:
> > > Hi,
> > >
> > >  Don't know what you folks do, but I have created a bunch of custom
> > >  bindings for different cases. The only thing I actually miss is the
> > >  ability to COMBINE them.
> > >
> > >  I.e., I have added a binding
> > >
> > >  equals:foo=bar
> > >
> > >  where foo and bar can be other binding objects or literals. I use
> > >  it successfully for switch/case situations like in
> > >
> > >  <t:if test="equals:foo='abc'"></t:if>
> > >  <t:if test="equals:foo='def'"></t:if>
> > >  ..
> > >  <t:if test="equals:foo='xyz'"></t:if>
> > >
> > >  without the need to write a lot of getters.
> > >
> > >  Now, I also have
> > >
> > >  map:foo.bar
> > >
> > >  where foo is suppose to be a HashMap and it will call foo.get(bar).
> > >
> > >  As a result, all I want is the ability to have a way to specify foo
> > and
> > >  bar with the same binding prefix as in the beginning.
> > >
> > >  For example, if I have a object that has a getter that returns a
> > >  hashmap, I would love to write
> > >
> > >  ----------------------
> > >  map:(prop:obj.foo).bar
> > >  ----------------------
> > >
> > >  which would call
> > >
> > >  obj.getFoo().get('bar')
> > >
> > >  If I could get this working (I don't care about the syntax), I would
> > be
> > >  able to fulfill all my need by writing (and maybe contributing) a
> > few
> > >  custom bindings.
> > >
> > >
> > >
> > >
> > >  On 9 maj 2008, at 18.31, Sven Homburg wrote:
> > >
> > > >
> > > >
> > > >
> > > >
> > > > we will see what can we do ....
> > > >
> > > > 2008/5/9 Howard Lewis Ship <hl...@gmail.com>:
> > > >
> > > >
> > > > >
> > > > >
> > > > >
> > > > > Nope; I just want to let you create Insanely Great things, using
> > T5 as
> > > the
> > > > > base.
> > > > >
> > > > > On Fri, May 9, 2008 at 9:10 AM, Sven Homburg
> > <ho...@googlemail.com>
> > > > > wrote:
> > > > >
> > > > >
> > > > > > howard,
> > > > > >
> > > > > > you make us jobless ;-)
> > > > > >
> > > > > > 2008/5/9 Howard Lewis Ship <hl...@gmail.com>:
> > > > > >
> > > > > >
> > > > > > > In 5.1 I want to extend the Tapestry property expression
> > language
> > > > > > > quite a bit further to address this (invoking methods), as
> > well as
> > > map
> > > > > > > and array ceation ... basically, all the cool OGNL stuff
> > people
> > > miss.
> > > > > > >
> > > > > > > On Fri, May 9, 2008 at 7:52 AM, kranga <kr...@k2d2.org>
> > wrote:
> > > > > > >
> > > > > > > > In looking at converting from T3 to T5, I've to deal with
> > > constructs
> > > > > > > >
> > > > > > >
> > > > > >
> > > > > such
> > > > >
> > > > > >
> > > > > > >
> > > > > > > > as:
> > > > > > > >
> > > > > > > > class="ognl:menuClassName('home')"  where getMenuClassName
> > uses
> > > the
> > > > > > > > parameter to compare with the page's "id" passed in to
> > determine
> > > if
> > > > > > > >
> > > > > > >
> > > > > >
> > > > > this
> > > > >
> > > > > >
> > > > > > > is
> > > > > > >
> > > > > > > > the currentPage or not. So the template has multiple links
> > with
> > > > > > > >
> > > > > > > constructs
> > > > > > >
> > > > > > > > such as:
> > > > > > > >
> > > > > > > > class="ognl:menuClassName('about')"
> > > > > > > > class="ognl:menuClassName('contact')" etc.
> > > > > > > >
> > > > > > > > How do I do this in T5 given that prop bindings to methods
> > cannot
> > > > > > > >
> > > > > > >
> > > > > >
> > > > > accept
> > > > >
> > > > > >
> > > > > > >
> > > > > > > > arguments? I'm sure there is a workaround, I just can't
> > seem to
> > > find
> > > > > > > >
> > > > > > >
> > > > > >
> > > > > one.
> > > > >
> > > > > >
> > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > > Howard M. Lewis Ship
> > > > > > >
> > > > > >
> > > > > > Sven Homburg
> > > > > >
> > > > >
> > > > > Howard M. Lewis Ship
> > > > >
> > > > >
> > > >
> > > > Sven Homburg
> > > >
> > >
> > >
> > >  --------------------------------------------------------------------
> > -
> > >  To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > >  For additional commands, e-mail: users-help@tapestry.apache.org
> > >
> > >
> >
> >
> >
> > --
> > Howard M. Lewis Ship
> >
> > Creator Apache Tapestry and Apache HiveMind
> >
> > ---------------------------------------------------------------------
> > 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
>
>



-- 
--
TheDailyTube.com. Sign up and get the best new videos on the internet
delivered fresh to your inbox.

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


RE: T5: Calling method with parameter in prop

Posted by "Blower, Andy" <An...@proquest.co.uk>.
This should be done with care though IMO. To me, one big advantage of T5 over JSP's with EL or OGNL is that you are forced to keep the logic out of the templates for the most part. Simple comparisons and single parameter accessors seem okay, but I've always been surprised when seeing people on the list want full OGNL functionality. Maybe I've had too many issues with overcomplicated JSP's that have subsequently been broken by designers over the years to want to the temptation any more... lol.

> -----Original Message-----
> From: Howard Lewis Ship [mailto:hlship@gmail.com]
> Sent: 12 May 2008 21:59
> To: Tapestry users
> Subject: Re: T5: Calling method with parameter in prop
>
> Mor expression language would be great; the pain is when you pull
> values out of a Map  or Collection and lose their type, at which point
> you also lose annotations and components such as BeanEditor and Grid
> no longer operate as expected.
>
> But I agree that having a few boolean operators in the expression
> language would be great: eq, lt, gt, gteq, lteq, etc.
>
> On Mon, May 12, 2008 at 2:26 AM, Andreas Pardeike <ap...@fsys.se> wrote:
> > Hi,
> >
> >  Don't know what you folks do, but I have created a bunch of custom
> >  bindings for different cases. The only thing I actually miss is the
> >  ability to COMBINE them.
> >
> >  I.e., I have added a binding
> >
> >  equals:foo=bar
> >
> >  where foo and bar can be other binding objects or literals. I use
> >  it successfully for switch/case situations like in
> >
> >  <t:if test="equals:foo='abc'"></t:if>
> >  <t:if test="equals:foo='def'"></t:if>
> >  ..
> >  <t:if test="equals:foo='xyz'"></t:if>
> >
> >  without the need to write a lot of getters.
> >
> >  Now, I also have
> >
> >  map:foo.bar
> >
> >  where foo is suppose to be a HashMap and it will call foo.get(bar).
> >
> >  As a result, all I want is the ability to have a way to specify foo
> and
> >  bar with the same binding prefix as in the beginning.
> >
> >  For example, if I have a object that has a getter that returns a
> >  hashmap, I would love to write
> >
> >  ----------------------
> >  map:(prop:obj.foo).bar
> >  ----------------------
> >
> >  which would call
> >
> >  obj.getFoo().get('bar')
> >
> >  If I could get this working (I don't care about the syntax), I would
> be
> >  able to fulfill all my need by writing (and maybe contributing) a
> few
> >  custom bindings.
> >
> >
> >
> >
> >  On 9 maj 2008, at 18.31, Sven Homburg wrote:
> >
> > >
> > >
> > >
> > >
> > > we will see what can we do ....
> > >
> > > 2008/5/9 Howard Lewis Ship <hl...@gmail.com>:
> > >
> > >
> > > >
> > > >
> > > >
> > > > Nope; I just want to let you create Insanely Great things, using
> T5 as
> > the
> > > > base.
> > > >
> > > > On Fri, May 9, 2008 at 9:10 AM, Sven Homburg
> <ho...@googlemail.com>
> > > > wrote:
> > > >
> > > >
> > > > > howard,
> > > > >
> > > > > you make us jobless ;-)
> > > > >
> > > > > 2008/5/9 Howard Lewis Ship <hl...@gmail.com>:
> > > > >
> > > > >
> > > > > > In 5.1 I want to extend the Tapestry property expression
> language
> > > > > > quite a bit further to address this (invoking methods), as
> well as
> > map
> > > > > > and array ceation ... basically, all the cool OGNL stuff
> people
> > miss.
> > > > > >
> > > > > > On Fri, May 9, 2008 at 7:52 AM, kranga <kr...@k2d2.org>
> wrote:
> > > > > >
> > > > > > > In looking at converting from T3 to T5, I've to deal with
> > constructs
> > > > > > >
> > > > > >
> > > > >
> > > > such
> > > >
> > > > >
> > > > > >
> > > > > > > as:
> > > > > > >
> > > > > > > class="ognl:menuClassName('home')"  where getMenuClassName
> uses
> > the
> > > > > > > parameter to compare with the page's "id" passed in to
> determine
> > if
> > > > > > >
> > > > > >
> > > > >
> > > > this
> > > >
> > > > >
> > > > > > is
> > > > > >
> > > > > > > the currentPage or not. So the template has multiple links
> with
> > > > > > >
> > > > > > constructs
> > > > > >
> > > > > > > such as:
> > > > > > >
> > > > > > > class="ognl:menuClassName('about')"
> > > > > > > class="ognl:menuClassName('contact')" etc.
> > > > > > >
> > > > > > > How do I do this in T5 given that prop bindings to methods
> cannot
> > > > > > >
> > > > > >
> > > > >
> > > > accept
> > > >
> > > > >
> > > > > >
> > > > > > > arguments? I'm sure there is a workaround, I just can't
> seem to
> > find
> > > > > > >
> > > > > >
> > > > >
> > > > one.
> > > >
> > > > >
> > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > > Howard M. Lewis Ship
> > > > > >
> > > > >
> > > > > Sven Homburg
> > > > >
> > > >
> > > > Howard M. Lewis Ship
> > > >
> > > >
> > >
> > > Sven Homburg
> > >
> >
> >
> >  --------------------------------------------------------------------
> -
> >  To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >  For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
>
>
> --
> Howard M. Lewis Ship
>
> Creator Apache Tapestry and Apache HiveMind
>
> ---------------------------------------------------------------------
> 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: T5: Calling method with parameter in prop

Posted by Howard Lewis Ship <hl...@gmail.com>.
Mor expression language would be great; the pain is when you pull
values out of a Map  or Collection and lose their type, at which point
you also lose annotations and components such as BeanEditor and Grid
no longer operate as expected.

But I agree that having a few boolean operators in the expression
language would be great: eq, lt, gt, gteq, lteq, etc.

On Mon, May 12, 2008 at 2:26 AM, Andreas Pardeike <ap...@fsys.se> wrote:
> Hi,
>
>  Don't know what you folks do, but I have created a bunch of custom
>  bindings for different cases. The only thing I actually miss is the
>  ability to COMBINE them.
>
>  I.e., I have added a binding
>
>  equals:foo=bar
>
>  where foo and bar can be other binding objects or literals. I use
>  it successfully for switch/case situations like in
>
>  <t:if test="equals:foo='abc'"></t:if>
>  <t:if test="equals:foo='def'"></t:if>
>  ..
>  <t:if test="equals:foo='xyz'"></t:if>
>
>  without the need to write a lot of getters.
>
>  Now, I also have
>
>  map:foo.bar
>
>  where foo is suppose to be a HashMap and it will call foo.get(bar).
>
>  As a result, all I want is the ability to have a way to specify foo and
>  bar with the same binding prefix as in the beginning.
>
>  For example, if I have a object that has a getter that returns a
>  hashmap, I would love to write
>
>  ----------------------
>  map:(prop:obj.foo).bar
>  ----------------------
>
>  which would call
>
>  obj.getFoo().get('bar')
>
>  If I could get this working (I don't care about the syntax), I would be
>  able to fulfill all my need by writing (and maybe contributing) a few
>  custom bindings.
>
>
>
>
>  On 9 maj 2008, at 18.31, Sven Homburg wrote:
>
> >
> >
> >
> >
> > we will see what can we do ....
> >
> > 2008/5/9 Howard Lewis Ship <hl...@gmail.com>:
> >
> >
> > >
> > >
> > >
> > > Nope; I just want to let you create Insanely Great things, using T5 as
> the
> > > base.
> > >
> > > On Fri, May 9, 2008 at 9:10 AM, Sven Homburg <ho...@googlemail.com>
> > > wrote:
> > >
> > >
> > > > howard,
> > > >
> > > > you make us jobless ;-)
> > > >
> > > > 2008/5/9 Howard Lewis Ship <hl...@gmail.com>:
> > > >
> > > >
> > > > > In 5.1 I want to extend the Tapestry property expression language
> > > > > quite a bit further to address this (invoking methods), as well as
> map
> > > > > and array ceation ... basically, all the cool OGNL stuff people
> miss.
> > > > >
> > > > > On Fri, May 9, 2008 at 7:52 AM, kranga <kr...@k2d2.org> wrote:
> > > > >
> > > > > > In looking at converting from T3 to T5, I've to deal with
> constructs
> > > > > >
> > > > >
> > > >
> > > such
> > >
> > > >
> > > > >
> > > > > > as:
> > > > > >
> > > > > > class="ognl:menuClassName('home')"  where getMenuClassName uses
> the
> > > > > > parameter to compare with the page's "id" passed in to determine
> if
> > > > > >
> > > > >
> > > >
> > > this
> > >
> > > >
> > > > > is
> > > > >
> > > > > > the currentPage or not. So the template has multiple links with
> > > > > >
> > > > > constructs
> > > > >
> > > > > > such as:
> > > > > >
> > > > > > class="ognl:menuClassName('about')"
> > > > > > class="ognl:menuClassName('contact')" etc.
> > > > > >
> > > > > > How do I do this in T5 given that prop bindings to methods cannot
> > > > > >
> > > > >
> > > >
> > > accept
> > >
> > > >
> > > > >
> > > > > > arguments? I'm sure there is a workaround, I just can't seem to
> find
> > > > > >
> > > > >
> > > >
> > > one.
> > >
> > > >
> > > > >
> > > > > >
> > > > > >
> > > > >
> > > > > Howard M. Lewis Ship
> > > > >
> > > >
> > > > Sven Homburg
> > > >
> > >
> > > Howard M. Lewis Ship
> > >
> > >
> >
> > Sven Homburg
> >
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>  For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

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


Re: T5: Calling method with parameter in prop

Posted by Andreas Pardeike <ap...@fsys.se>.
Hi,

Don't know what you folks do, but I have created a bunch of custom
bindings for different cases. The only thing I actually miss is the
ability to COMBINE them.

I.e., I have added a binding

equals:foo=bar

where foo and bar can be other binding objects or literals. I use
it successfully for switch/case situations like in

<t:if test="equals:foo='abc'"></t:if>
<t:if test="equals:foo='def'"></t:if>
..
<t:if test="equals:foo='xyz'"></t:if>

without the need to write a lot of getters.

Now, I also have

map:foo.bar

where foo is suppose to be a HashMap and it will call foo.get(bar).

As a result, all I want is the ability to have a way to specify foo and
bar with the same binding prefix as in the beginning.

For example, if I have a object that has a getter that returns a
hashmap, I would love to write

----------------------
map:(prop:obj.foo).bar
----------------------

which would call

obj.getFoo().get('bar')

If I could get this working (I don't care about the syntax), I would be
able to fulfill all my need by writing (and maybe contributing) a few
custom bindings.


On 9 maj 2008, at 18.31, Sven Homburg wrote:
>
> we will see what can we do ....
>
> 2008/5/9 Howard Lewis Ship <hl...@gmail.com>:
>
>> Nope; I just want to let you create Insanely Great things, using T5  
>> as the
>> base.
>>
>> On Fri, May 9, 2008 at 9:10 AM, Sven Homburg  
>> <ho...@googlemail.com>
>> wrote:
>>
>>> howard,
>>>
>>> you make us jobless ;-)
>>>
>>> 2008/5/9 Howard Lewis Ship <hl...@gmail.com>:
>>>
>>>> In 5.1 I want to extend the Tapestry property expression language
>>>> quite a bit further to address this (invoking methods), as well  
>>>> as map
>>>> and array ceation ... basically, all the cool OGNL stuff people  
>>>> miss.
>>>>
>>>> On Fri, May 9, 2008 at 7:52 AM, kranga <kr...@k2d2.org> wrote:
>>>>> In looking at converting from T3 to T5, I've to deal with  
>>>>> constructs
>> such
>>>>> as:
>>>>>
>>>>> class="ognl:menuClassName('home')"  where getMenuClassName uses  
>>>>> the
>>>>> parameter to compare with the page's "id" passed in to determine  
>>>>> if
>> this
>>>> is
>>>>> the currentPage or not. So the template has multiple links with
>>>> constructs
>>>>> such as:
>>>>>
>>>>> class="ognl:menuClassName('about')"
>>>>> class="ognl:menuClassName('contact')" etc.
>>>>>
>>>>> How do I do this in T5 given that prop bindings to methods cannot
>> accept
>>>>> arguments? I'm sure there is a workaround, I just can't seem to  
>>>>> find
>> one.
>>>>>
>>>>
>>>> Howard M. Lewis Ship
>>>
>>> Sven Homburg
>>
>> Howard M. Lewis Ship
>>
>
> Sven Homburg

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


Re: T5: Calling method with parameter in prop

Posted by Sven Homburg <ho...@googlemail.com>.
we will see what can we do ....

2008/5/9 Howard Lewis Ship <hl...@gmail.com>:

> Nope; I just want to let you create Insanely Great things, using T5 as the
> base.
>
> On Fri, May 9, 2008 at 9:10 AM, Sven Homburg <ho...@googlemail.com>
> wrote:
> > howard,
> >
> > you make us jobless ;-)
> >
> > 2008/5/9 Howard Lewis Ship <hl...@gmail.com>:
> >
> >> In 5.1 I want to extend the Tapestry property expression language
> >> quite a bit further to address this (invoking methods), as well as map
> >> and array ceation ... basically, all the cool OGNL stuff people miss.
> >>
> >> On Fri, May 9, 2008 at 7:52 AM, kranga <kr...@k2d2.org> wrote:
> >> > In looking at converting from T3 to T5, I've to deal with constructs
> such
> >> > as:
> >> >
> >> > class="ognl:menuClassName('home')"  where getMenuClassName uses the
> >> > parameter to compare with the page's "id" passed in to determine if
> this
> >> is
> >> > the currentPage or not. So the template has multiple links with
> >> constructs
> >> > such as:
> >> >
> >> > class="ognl:menuClassName('about')"
> >> > class="ognl:menuClassName('contact')" etc.
> >> >
> >> > How do I do this in T5 given that prop bindings to methods cannot
> accept
> >> > arguments? I'm sure there is a workaround, I just can't seem to find
> one.
> >> >
> >> > ---------------------------------------------------------------------
> >> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >> > For additional commands, e-mail: users-help@tapestry.apache.org
> >> >
> >> >
> >>
> >>
> >>
> >> --
> >> Howard M. Lewis Ship
> >>
> >> Creator Apache Tapestry and Apache HiveMind
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >> For additional commands, e-mail: users-help@tapestry.apache.org
> >>
> >>
> >
> >
> > --
> > with regards
> > Sven Homburg
> > http://tapestry5-components.googlecode.com
> >
>
>
>
> --
> Howard M. Lewis Ship
>
> Creator Apache Tapestry and Apache HiveMind
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
with regards
Sven Homburg
http://tapestry5-components.googlecode.com

Re: T5: Calling method with parameter in prop

Posted by Howard Lewis Ship <hl...@gmail.com>.
Nope; I just want to let you create Insanely Great things, using T5 as the base.

On Fri, May 9, 2008 at 9:10 AM, Sven Homburg <ho...@googlemail.com> wrote:
> howard,
>
> you make us jobless ;-)
>
> 2008/5/9 Howard Lewis Ship <hl...@gmail.com>:
>
>> In 5.1 I want to extend the Tapestry property expression language
>> quite a bit further to address this (invoking methods), as well as map
>> and array ceation ... basically, all the cool OGNL stuff people miss.
>>
>> On Fri, May 9, 2008 at 7:52 AM, kranga <kr...@k2d2.org> wrote:
>> > In looking at converting from T3 to T5, I've to deal with constructs such
>> > as:
>> >
>> > class="ognl:menuClassName('home')"  where getMenuClassName uses the
>> > parameter to compare with the page's "id" passed in to determine if this
>> is
>> > the currentPage or not. So the template has multiple links with
>> constructs
>> > such as:
>> >
>> > class="ognl:menuClassName('about')"
>> > class="ognl:menuClassName('contact')" etc.
>> >
>> > How do I do this in T5 given that prop bindings to methods cannot accept
>> > arguments? I'm sure there is a workaround, I just can't seem to find one.
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> > For additional commands, e-mail: users-help@tapestry.apache.org
>> >
>> >
>>
>>
>>
>> --
>> Howard M. Lewis Ship
>>
>> Creator Apache Tapestry and Apache HiveMind
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
>
> --
> with regards
> Sven Homburg
> http://tapestry5-components.googlecode.com
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

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


Re: T5: Calling method with parameter in prop

Posted by Sven Homburg <ho...@googlemail.com>.
howard,

you make us jobless ;-)

2008/5/9 Howard Lewis Ship <hl...@gmail.com>:

> In 5.1 I want to extend the Tapestry property expression language
> quite a bit further to address this (invoking methods), as well as map
> and array ceation ... basically, all the cool OGNL stuff people miss.
>
> On Fri, May 9, 2008 at 7:52 AM, kranga <kr...@k2d2.org> wrote:
> > In looking at converting from T3 to T5, I've to deal with constructs such
> > as:
> >
> > class="ognl:menuClassName('home')"  where getMenuClassName uses the
> > parameter to compare with the page's "id" passed in to determine if this
> is
> > the currentPage or not. So the template has multiple links with
> constructs
> > such as:
> >
> > class="ognl:menuClassName('about')"
> > class="ognl:menuClassName('contact')" etc.
> >
> > How do I do this in T5 given that prop bindings to methods cannot accept
> > arguments? I'm sure there is a workaround, I just can't seem to find one.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
>
>
> --
> Howard M. Lewis Ship
>
> Creator Apache Tapestry and Apache HiveMind
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
with regards
Sven Homburg
http://tapestry5-components.googlecode.com

Re: T5: Calling method with parameter in prop

Posted by Howard Lewis Ship <hl...@gmail.com>.
In 5.1 I want to extend the Tapestry property expression language
quite a bit further to address this (invoking methods), as well as map
and array ceation ... basically, all the cool OGNL stuff people miss.

On Fri, May 9, 2008 at 7:52 AM, kranga <kr...@k2d2.org> wrote:
> In looking at converting from T3 to T5, I've to deal with constructs such
> as:
>
> class="ognl:menuClassName('home')"  where getMenuClassName uses the
> parameter to compare with the page's "id" passed in to determine if this is
> the currentPage or not. So the template has multiple links with constructs
> such as:
>
> class="ognl:menuClassName('about')"
> class="ognl:menuClassName('contact')" etc.
>
> How do I do this in T5 given that prop bindings to methods cannot accept
> arguments? I'm sure there is a workaround, I just can't seem to find one.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

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


RE: T5: Calling method with parameter in prop

Posted by Jonathan Barker <jo...@gmail.com>.
I missed that functionality as well.  I use the ognl binding available in
the t5components library. 

http://87.193.218.134:8080/t5components/index.html


I remember trying something complicated once, and I had problems with values
being cached that should not have been, but it worked beautifully for the
menu problem.



> -----Original Message-----
> From: kranga [mailto:kranga@k2d2.org]
> Sent: Friday, May 09, 2008 10:53 AM
> To: Tapestry users
> Subject: T5: Calling method with parameter in prop
> 
> In looking at converting from T3 to T5, I've to deal with constructs such
> as:
> 
> class="ognl:menuClassName('home')"  where getMenuClassName uses the
> parameter to compare with the page's "id" passed in to determine if this
> is
> the currentPage or not. So the template has multiple links with constructs
> such as:
> 
> class="ognl:menuClassName('about')"
> class="ognl:menuClassName('contact')" etc.
> 
> How do I do this in T5 given that prop bindings to methods cannot accept
> arguments? I'm sure there is a workaround, I just can't seem to find one.
> 
> 
> ---------------------------------------------------------------------
> 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: T5: Calling method with parameter in prop

Posted by Robert Zeigler <ro...@scazdl.org>.
Fastest solution is the t5components module, which re-introduces the  
ognl binding:
http://87.193.218.134:8080/t5components/t5c-commons/howto_ognlbinding.html

Cheers,

Robert

On May 9, 2008, at 5/99:52 AM , kranga wrote:

> In looking at converting from T3 to T5, I've to deal with constructs  
> such as:
>
> class="ognl:menuClassName('home')"  where getMenuClassName uses the  
> parameter to compare with the page's "id" passed in to determine if  
> this is the currentPage or not. So the template has multiple links  
> with constructs such as:
>
> class="ognl:menuClassName('about')"
> class="ognl:menuClassName('contact')" etc.
>
> How do I do this in T5 given that prop bindings to methods cannot  
> accept arguments? I'm sure there is a workaround, I just can't seem  
> to find one.
>
> ---------------------------------------------------------------------
> 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