JoeAB
JoeAB

Reputation: 53

How to include default css file for Wicket Palette?

I have the same problem as described in Palette does not render arrows since Wicket 7.x.x

The example includes a link with the href palette-ver-48087C00867DD23918CC93E129A02A8D.css.

How can I include the css file from 1) an imported jar file, or 2) from the web?

Upvotes: 0

Views: 601

Answers (2)

Ayyammal Pandian
Ayyammal Pandian

Reputation: 3

 private static final ResourceReference Custom = new CssResourceReference(DefaultTheme.class,
            "mypalette.css");


    public Palette(final String id, final IModel<? extends Collection<T>> model,
            final IModel<? extends Collection<? extends T>> choicesModel,
            final IChoiceRenderer<? super T> choiceRenderer, final int rows, final boolean allowOrder,
            boolean allowMoveAll).add(new DefaultTheme().renderHead(this,Custom);

Upvotes: 0

martin-g
martin-g

Reputation: 17513

See https://github.com/apache/wicket/blob/5d87f50646d13d858eab69d7892075be8cdb1dbd/wicket-examples/src/main/java/org/apache/wicket/examples/compref/PalettePage.java#L54

In the demo page for the Wicket Examples the Palette component uses DefaultTheme behavior to contribute palette.css. You could use your own Behavior to contribute custom theme.

Upvotes: 2

Related Questions