You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Brent Johnson <bl...@gmail.com> on 2005/04/11 21:51:54 UTC
JXTemplate - Output Fixed Number Columns
Sorry, this may be a stupid question, but I can't think up a way to do
this in a JXTemplate.
I've got an ArrayList I'm passing into a JXTemplate with
sendPageAndWait(). Let's say that it has a size of 8. I want to
output a table with a fixed number of 3 columns. So there would be
the first three items in the first row, 3 on the second, and the last
2 on the third.
Any pointers on how I can do this using jx:forEach or something similar?
Thanks,
- Brent
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: JXTemplate - Output Fixed Number Columns
Posted by Brent Johnson <bl...@gmail.com>.
Yeah, I've got some helper classes that handle the Hibernate objects
for loading the data from the database. The helper runs a hibernate
query pulling a list of objects and returns them as a List. I think
I'll just do as you suggested and have it create an array of arrays
before sending it back to the JXTemplate.
Thanks,
- Brent
On 4/11/05, Leszek Gawron <lg...@mobilebox.pl> wrote:
> you are better off creating a custom generator for that or you could
> just split up your data at controller level sending an array of arrays
> to jxtemplate.
>
> --
> Leszek Gawron lgawron@mobilebox.pl
> IT Manager MobileBox sp. z o.o.
> +48 (61) 855 06 67 http://www.mobilebox.pl
> mobile: +48 (501) 720 812 fax: +48 (61) 853 29 65
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: JXTemplate - Output Fixed Number Columns
Posted by Leszek Gawron <lg...@mobilebox.pl>.
Brent Johnson wrote:
> Sorry, this may be a stupid question, but I can't think up a way to do
> this in a JXTemplate.
>
> I've got an ArrayList I'm passing into a JXTemplate with
> sendPageAndWait(). Let's say that it has a size of 8. I want to
> output a table with a fixed number of 3 columns. So there would be
> the first three items in the first row, 3 on the second, and the last
> 2 on the third.
>
> Any pointers on how I can do this using jx:forEach or something similar?
you are better off creating a custom generator for that or you could
just split up your data at controller level sending an array of arrays
to jxtemplate.
--
Leszek Gawron lgawron@mobilebox.pl
IT Manager MobileBox sp. z o.o.
+48 (61) 855 06 67 http://www.mobilebox.pl
mobile: +48 (501) 720 812 fax: +48 (61) 853 29 65
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org