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 <[EMAIL PROTECTED]>:
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
<[EMAIL PROTECTED]>
wrote:
howard,
you make us jobless ;-)
2008/5/9 Howard Lewis Ship <[EMAIL PROTECTED]>:
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 <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]