The benchmark has some requisites[1]:
<quote>
Framework features

For each framework, the page needs to use the following framework features:
-rendering of a list of products, each rendered as a custom component
so that the layout of each product can be reused on other pages. For
each product, it’s associated categories are shown.
-Separation of the page into a template that can also be used for
other pages, and the content that is unique for each page (this
content is surrounded by the template).
-Injection of the page name (including the number of products) in the
title tag, and in the master template page name.
</quote>

The final page products should look like this one:
https://github.com/jtdev/blogpost_files/blob/master/template.xhtml
The resulting page uses a product panel and the associated categories
of each product in each table row. So, I can't move all the page
template code into the panel template since it will break the rules.

Regards,

Gilberto

[1]http://www.jtict.com/blog/rails-wicket-grails-play-lift-jsp/


On Tue, Aug 23, 2011 at 1:50 AM, Bob Schellink <[email protected]> wrote:
> Currently the panel is rendered and only then is products added to it. You
> need to swap the order around. First add, then render.
>
> Basically your page template should contain only: $panel
>
> Move the page template code into the panel template, and lastly add the
> products to the panel inside the Java Page. This means you populate the
> panel with products before rendering it.
>
> Bob
>
> On 2011/08/22 20:49 PM, Gilberto wrote:
>>
>> Thinking a little more about it[1]:
>> <quote>
>> <table>
>>     #foreach( $p in $products )
>>     <tr>
>>         <td>$productPanel($p)</td>
>>         <td class="categories">
>>             #foreach( $c in $p.categories )
>>             #if ($foreach.count>1),#end $c.name #end
>>         </td>
>>     </tr>
>>     #end
>> </table>
>> </quote>
>>
>> I guess it can't work because the panel component can't be used in the
>> loop. I would need a repeatable panel in this case, right?
>>
>> Regards,
>>
>> Gilberto
>>
>> [1] http://dl.dropbox.com/u/9093640/clickapp.zip
>>
>
>

Reply via email to