[prev in list] [next in list] [prev in thread] [next in thread]
List: tapestry-user
Subject: Re: [T5] SUGGESTION: Loop component -> Provide an 'empty' block as in the Grid?
From: "Howard Lewis Ship" <hlship () gmail ! com>
Date: 2008-02-29 23:06:15
Message-ID: ecd0e3310802291506h616d49b1iaf2ae44a7d2395e8 () mail ! gmail ! com
[Download RAW message or body]
Doesn't mean I'm going to implement it :-)
On Fri, Feb 29, 2008 at 2:54 PM, David Marquis <dmarquis@neopeak.com> wrote:
> Done!
> https://issues.apache.org/jira/browse/TAPESTRY-2213
>
> Thank you Howard,
>
> --
> David
>
>
>
> On 29-Feb-08, at 1:49 PM, Howard Lewis Ship wrote:
>
> > Sounds reasonable to me; add it to JIRA.
> >
> > On Fri, Feb 29, 2008 at 10:14 AM, David Marquis
> > <dmarquis@neopeak.com> wrote:
> >> Hi all,
> >>
> >> I have a quick suggestion to improve the Loop component:
> >>
> >> We should be able to specify a block to display if the loop source is
> >> empty (size = 0)
> >>
> >> <div t:type="loop" source="emptyList">
> >> <t:parameter name="empty">There is no item matching your
> >> request</
> >> t:parameter>
> >> </div>
> >>
> >> I know we can do this :
> >> <t:if test="emptyList">
> >> <div t:type="loop" source="emptyList">
> >> <t:parameter name="empty">There is no item matching
> >> your request</
> >> t:parameter>
> >> </div>
> >> </t:if>
> >>
> >> BUT this will have the result of calling the "getEmptyList()" getter
> >> in the component code twice.
> >> If you access the database in the getter (as the docs suggest quite a
> >> few times), this will call the database twice for nothing.
> >>
> >> What do you guys think ?
> >>
> >> --
> >> David
> >>
> >>
> >
> >
> >
> > --
> > 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
> >
>
>
--
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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic