[
https://issues.apache.org/jira/browse/WICKET-4007?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13094251#comment-13094251
]
Bruno Borges commented on WICKET-4007:
--------------------------------------
VelocityPanel will always be a way to implement this, but it will never be
part of Wicket's core. Also, it's not practical to use it everywhere. And will
always require extra work (boilerplate code) to set up a page capable of
processing its markup with Velocity (without VPanel) before returning it (the
markup) to Wicket.
Also, Velocity has support for logic structures, loops and so on. This proposal
does not aim to add that.
If I'm able to do a <wicket:message> for i18n resources (not dynamic), why am I
not able to do that with Models, which is something that is part of Wicket's
core, just like i18n resources?
> New tag wicket:var
> ------------------
>
> Key: WICKET-4007
> URL: https://issues.apache.org/jira/browse/WICKET-4007
> Project: Wicket
> Issue Type: New Feature
> Components: wicket
> Reporter: Bruno Borges
> Labels: tag,, variable, wicket,
> Attachments: wicket-var-feature.diff
>
>
> This will facilitate users to reference models in several places of the
> markup.
> One can do:
> class Page extends WebPage {
> public Page() {
> putVariable("username", "Peter Johnson");
> }
> }
> <html>
> <body>
> <div class="header">
> <wicket:var name="name" />
> </div>
> <div class="container">
> <wicket:var name="name" />
> </div>
> <div class="footer">
> <wicket:var name="name" />
> </div>
> </body>
> </html>
> It will be possible too to do such a thing:
> Java: putVariable("css", "blue-header");
> HTML: <div wicket:var="class:css">
> And render: <div class="blue-header">
> These variables can be rendered multiple times and my also be accessed from
> child objects (but not the opposite), like:
> add(new WebMarkupContainer("header"));
> <div wicket:id="header">
> <span wicket:var="class:css">Header</span>
> </div>
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira