You're still going to get parse errors. The trick around the parse errors is to use the insert component.
<span jwcid="@Insert" value="</tr><tr>" raw="true"/>

Definitely a kludge. But it will get the job done.

Cheers,

Robert

On Oct 9, 2007, at 10/99:36 AM , Ken nashua wrote:


Ok, I am trying this now... hopefully it will work...

<tr>
<span jwcid="[EMAIL PROTECTED]" source="ognl:collection" value="ognl:currentObject" index="ognl:index">
        <span jwcid="@If" condition="ognl:(index % 3) == 0">
            </tr><tr>
            <td></td>
        </span>
        <span jwcid="@Else">
            <td></td>
        </span>
    </span>
</tr>

Best regards
Ken in nashua

From: [EMAIL PROTECTED]
To: users@tapestry.apache.org
Subject: RE: does T-4.1.* have a COUNT component?
Date: Tue, 9 Oct 2007 10:33:33 -0400








Ok, now I have the template PARSE problem... on the </tr><tr> line... this is what ROB was referring to in earlier post.

Why hasn't tapestry fixed this? Is there a way around it?

<tr>
<span jwcid="[EMAIL PROTECTED]" source="ognl:collection" value="ognl:currentObject" index="ognl:index">
        <span jwcid="@If" condition="ognl:(index % 3) == 0">
            </tr><tr>
        </span>
        <td>render image stuff</td>
    </span>
</tr>

Best regards
Ken in nashua

From: [EMAIL PROTECTED]
To: users@tapestry.apache.org
Subject: RE: does T-4.1.* have a COUNT component?
Date: Tue, 9 Oct 2007 10:26:55 -0400








I am giving this a shot...

                        <tr>
<span jwcid="[EMAIL PROTECTED]" source="ognl:collection" value="ognl:currentObject" index="ognl:index">
                <span jwcid="@If" condition="ognl:(index % 3) == 0">
                    </tr><tr>
                </span>
                <td>
                </td>
            </span>

Best regards
Ken in nashua

From: [EMAIL PROTECTED]
To: users@tapestry.apache.org
Subject: RE: does T-4.1.* have a COUNT component?
Date: Tue, 9 Oct 2007 10:20:40 -0400








OK given 9 elements...

0   1   2   3   4   5   6   7   8   9

Here is the case logic...
1. I need to render a <TR> on the 1st of every 3rd.
2. I need to render a </TR> on 3rd of every 3rd

I am not sure if "ognl:(index % 3) == 0" even qualifies for any of these but I need two cases.

Best regards
Ken in nashua

From: [EMAIL PROTECTED]
To: users@tapestry.apache.org
Subject: RE: does T-4.1.* have a COUNT component?
Date: Tue, 9 Oct 2007 10:16:23 -0400








Richard... that worked... (or at least the condition is functioning). Thanks.

BUT...

Only half the rows contain 2 elements. So the logic is working only half way. To get this proper, there needs to be a startOfRow condition and an endOfRow condition.

Can anyone elaborate on a formula for that? Thanks in advance.

Best regards
Ken in nashua

From: [EMAIL PROTECTED]
To: users@tapestry.apache.org
Subject: RE: does T-4.1.* have a COUNT component?
Date: Tue, 9 Oct 2007 10:02:09 -0400








I guess I am trying to determine what the two conditions are for rendering. There is a startOfRow <TR> condition and then an endOfRow </TR> condition.

Thanks for any tips.

Best regards
Ken in nashua

From: [EMAIL PROTECTED]
To: users@tapestry.apache.org
Subject: RE: does T-4.1.* have a COUNT component?
Date: Tue, 9 Oct 2007 09:55:07 -0400








Can anyone explain why this code renders only the true case?

It is as if the ELSE does not even work.

<span jwcid="[EMAIL PROTECTED]" source="ognl:collection" value="ognl:currentObject" index="ognl:index">
    <span jwcid="@If" condition="(ognl:index % 3)) == 0">
        <tr>
            <td>true case</td>
        </tr>
    </span>
    <span jwcid="@Else">
            <td>false case</td>
    </span>
</span>

If I have a list of elements 9 in length...

I should get 3 rows in my table right?

Can anyone check this out? Either there is a bug in ELSE component or the condition is bogus to render 3 rows.

Thanks in advance.

Best regards
Ken in nashua

From: [EMAIL PROTECTED]
To: users@tapestry.apache.org
Subject: does T-4.1.* have a COUNT component?
Date: Mon, 8 Oct 2007 14:27:29 -0400








Ok I tried a custom Loop hybrid but that failed to do uncoordinated indices between collection and loop.

All I want to do is increment a count within the template and act on it when it reaches a certain value and then reset it.

IE. render <TR> tag every 3 iterations of my outer For loop.

Does this exist in Tapestry?

Best regards
Ken in nashua
Climb to the top of the charts! Play Star Shuffle: the word scramble challenge with star power. Play Now!

Peek-a-boo FREE Tricks & Treats for You! Get 'em!

Windows Live Hotmail and Microsoft Office Outlook – together at last. Get it now!

Climb to the top of the charts! Play Star Shuffle: the word scramble challenge with star power. Play Now!

Climb to the top of the charts! Play Star Shuffle: the word scramble challenge with star power. Play Now!

Climb to the top of the charts! Play Star Shuffle: the word scramble challenge with star power. Play Now!

Help yourself to FREE treats served up daily at the Messenger Café. Stop by today!

_________________________________________________________________
Windows Live Hotmail and Microsoft Office Outlook – together at last. Get it now. http://office.microsoft.com/en-us/outlook/HA102225181033.aspx? pid=CL100626971033


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

Reply via email to