On Mon, Oct 8, 2012 at 8:27 AM, Ken in Nashua <kcola...@live.com> wrote:
>
> Thanks for trying Lance...
>
> i am re-writing a gallery widget. its all custom table... I cannot abstract 
> it like your suggesting.
>
> its custom

Which reads to me like "I don't understand how it works, and I can't
be bothered to understand it."  No framework will help you there.


>
> kcola...@live.com
>
>
>
>
> From: kcola...@live.com
> To: users@tapestry.apache.org
> Subject: first flag variable for request cycle loop
> Date: Mon, 8 Oct 2012 10:47:21 -0400
>
>
>
>
>
> Folks,
>
> I am rendering some markup in a loop
>
> psuedo
> <loop... index = blah blah
>
>     </tr><tr>
>
>         do alot of rendering stuff here
> </loop>
>
> Previously in T4 my code worked and the table row tags had to be placed at 
> the top of the loop to check a modulo on the index property
>
> Now in T5, my check for modulo comes out true first pass thru and my markup 
> for the table gets wrecked because the new table row gets rendered first.
>
> So I need a firstFlag variable to put in my method that checks for first flag.
>
> My question being...
>
> Whats the best way to implement a first flag? i know different rendering 
> phases happens and can occur at different places in the page, component and 
> within different request cycle methods... but I want to make sure I do this 
> check in the right place in case someone does a refresh on the page... the 
> state flag gets reset properly and used properly.
>
> Here is my method...
>     public boolean isAtNewRow() {
>         return ((index - cursor) % min(tableColumns, itemsPerPage) == 0);
>     }
>
> Does anyone know where the proper place could be to implement a first flag? 
> The purpose being is that i want to avoid rendering the new table row markup 
> on the first iteration because it is not a true new-table-row...
>
> Thanks for your assistance.
>
>
> kcola...@live.com
>
>
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to