Basically you can call from anywhere in your Java code:
- add(CSSPackageResource.getHeaderContribu
tion(NiceButton.class, "button.css"));
- add(JavascriptPackageResource.getHeaderC
ontribution(SomePanel.class, "panel.js"));
This also means that at the Page class level, you can choose to either use the CSS file provided by the component, or override and add your own instead.
Also, there is an option to provide a location instead (the more traditional way for web-apps) with the "getHeaderContribution" method.
Reference: Wicket WIKI
No comments:
Post a Comment