The behaviors are not used for variations.
For such use cases you should
override org.apache.wicket.Component#getVariation() on the (base) page.
This way all components will know the correct variation.

Martin Grigorov
Wicket Training and Consulting

On Wed, Sep 3, 2014 at 1:09 PM, Thibault Kruse <tibokr...@googlemail.com>

> Hi,
> playing around with Variants for Components, I am wondering whether
> there is an elegant way to steer Variant markup loading via a
> Behavior.
> In our case we want to use a different markup layout based on the
> width of the container the component is going to be used in, visually.
> So if we imagine a Browser window with desktop size, we might want to
> use a component on the full width, on a third of the width, or a
> quarter of the width.
> For each such container width, we need different responsive design
> markup. Since this may affect many of our components which inherit
> from different wicket components, I'd like to just add another html
> markup file for the variant, and add a Behavior to the component that
> decides the Variant.
> cheers,
>   Thibault
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to