[windup-dev] Simplifying reports - WindupVertexFrame#gremlin(...), Freemarker ...?framed(SomeModel)
Jess Sightler
jsightle at redhat.com
Wed Oct 28 13:56:27 EDT 2015
I would think that this would increase the complexity of the templates
quite a bit. In general I'm not that fond of this type of thing as the
templates are harder to test than service and method classes.
How hard would it be to implement?
On 10/22/2015 01:26 AM, Ondrej Zizka wrote:
> Hi team,
>
> it would be great if we could frame vertices in Freemarker templates.
> It would allow various tricks in @GremlinGroovy which could return
> things like .table() and .tree() and .groupBy(), i.e. Table, Map<Map<>>
> and Map<...>
> And then we could iterate through these structures right in the
> template, without need for
> a) extra type just to have somewhere to put the query to, or
> b) an extra Freemarker function.
>
> In combination with capability to do a gremlin query from WindupVertexFrame,
> it could work like this:
>
> <#list
> reportModel.rootProject.gremlin("it.as('root').subProjects.as('project').files.as('file').table.cap")
> as row>
> <tr>
> <td>${row['project']?frame('ProjectModel').name}</td>
> <td>${row['file']?frame('FileModel').prettyPath}</td>
> </tr>
> <#/list>
>
> The main advantage is that we could do quite complex data gathering
> right in the template without need to introduce yet another model.
> That could make reports significantly easier to code, IMO.
> WDYT? Is it useful? Is it possible?
>
> Ondra
>
> _______________________________________________
> windup-dev mailing list
> windup-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/windup-dev
More information about the windup-dev
mailing list