On Mon, Dec 5, 2011 at 7:52 PM, Andrei Voden <are...@gmail.com> wrote:
> I think using String.format for that is breaking idea of MVC where you
> endup writing JScript code in Java. Sounds really awkward.
> I guess I can hookup Velocity or Freemarker but isnt whole point of Wicket
> is to replace that?

you asked "how to do if/else in my templates" not me ;-)

 Plus another problem I see is if I have to use separate
> templates for each <script> tag I may end up with lots of small files so my
> logic will be peppered around.

The templates should be in separate files because this way your
components will contribute only what is needed by them.
But then Wicket can merge all these contributions in one <script> that
is delivered to the browser.

>
> Andrei
>
> On Mon, Dec 5, 2011 at 12:25 AM, Wilhelmsen Tor Iver 
> <toriv...@arrive.no>wrote:
>
>> <script>
>> .....templated code.....
>> </script>
>>
>> I tend to use a Label for that kind of scenario, where the Label's model
>> uses some other templating engine, anything from a simple String.format()
>> to a more complex beast like Velocity (or FreeMarker).
>>
>> <script wicket:id="complexScript">
>> </script>
>>
>> - Tor Iver
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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

Reply via email to