I'm not sure I like the idea of a framework FORCING me to do something, IMHO 
poorly structured code should be prevented by coding standards and peer 
reviews, not a rigid framework. Just moving the logic from a JSP/Template to a 
Java class doesn't necessarily mean it's cleaner. Sometimes it is actually 
clearer to put some logic in the template. 

In my experience T4 and 5 have proved to be very flexible, more so than JSF 
etc. so I'm surprised that there isn't some primitive form of EL in the TML.

Anyway, like I said, just one user's opinion!

Toby

----- Original Message ----
From: Josh Canfield <[EMAIL PROTECTED]>
To: Tapestry users <users@tapestry.apache.org>
Sent: Tuesday, 13 May, 2008 5:55:26 PM
Subject: Re: T5: Calling method with parameter in prop

On Tue, May 13, 2008 at 2:21 AM, Blower, Andy
<[EMAIL PROTECTED]> 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:[EMAIL PROTECTED]
> > 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 <[EMAIL PROTECTED]> 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 <[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]
> > >
> > >
> >
> >
> >
> > --
> > Howard M. Lewis Ship
> >
> > Creator Apache Tapestry and Apache HiveMind
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Reply via email to