Insert css class attributes for first/last. :)
Incidentally, regarding my earlier suggestion of making your own
component, you're absolutely right that loop would be difficult to
duplicate. But you don't need to duplicate it, per se. Just composite
it. Make your own component with the same parameters as loop, plus
your "delimiter" parameter. Then define a loop component, and just
use the "inherit" binding prefix for all of the parameters.
Then you can throw together a template with your loop, the if
component, the delimiter, and a <t:body/>, and you're set. In fact, I
just did this... took less than ten minutes to do. I suppose since I
already wrote it, I could package it up and throw it onto tassel or
something, if you want.
Robert
On Jan 14, 2008, at 1/1411:03 AM , Chris Lewis wrote:
Out of curiosity and within the scope of markup rendering in a
looping context, what would one do with with isFirst/isLast
knowledge, apart from using it to insert a delimiter?
Josh Canfield wrote:
Adding delimiter to the loop component sounds like a poor design
choice to me. It seems like the right thing to do would be to make
isFirst/isLast type attributes available from the loop.
Sent from my iPhone
On Jan 14, 2008, at 7:41 AM, Chris Lewis
<[EMAIL PROTECTED]> wrote:
Thanks for the reminder. As a note to others interested in this
thread, I created a JIRA suggesting the addition of a delimiter
parameter in the Loop.
https://issues.apache.org/jira/browse/TAPESTRY-2043
chris
Howard Lewis Ship wrote:
I have been keeping the nightly documentation up to date with
these changes.
Please look at http://tapestry.formos.com/nightly/tapestry5 and dig
down from there.
The main site will only be updated when a new release is generated,
the nightly is ... well, nightly.
On Jan 12, 2008 2:04 PM, Chris Lewis <[EMAIL PROTECTED]>
wrote:
So this ticket has been implemented in svn:
https://issues.apache.org/jira/browse/TAPESTRY-2028
And now I need whitespace... so how can I get it back? Is there
or isn't
there a way to disable this? Im using loop to output links
(pagelinks),
and i have whitespace behind in the body so there is separation.
Unfortunately, it's getting stripped. Is there a workaround?
On a related note, is there a way to know if im on the last
iteration of
the loop, so i could for example, follow all but the last with a
","?
This may be outside the scope of loop as currently implemented,
but i
can see it being useful.
chris
---------------------------------------------------------------------
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]
---------------------------------------------------------------------
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]