### Run Examples via Maven Source: https://github.com/wicketstuff/core/blob/master/openlayers3-parent/README.md Navigate to the examples directory and launch the application using Jetty. ```bash cd jdk-1.6-parent/openlayers3-parent/openlayers3-examples/ mvn jetty:run ``` -------------------------------- ### Wicket Push Usage Example Source: https://github.com/wicketstuff/core/wiki/projects/Push Example demonstrating the general usage pattern of wicket-push, including setting up an IPushEventHandler, obtaining an IPushService, installing a push node, and forwarding events from a background service. ```java /* * panel constructor */ public ChatPanel() { // setup UI components ... /* * 1. instantiate push event handler */ IPushEventHandler handler = new AbstractPushEventHandler() { public void onEvent(AjaxRequestTarget target, Message message, IPushNode node, IPushEventContext ctx) { // TODO your component update logic goes here... } }); /* * 2. obtain a reference to a Push service implementation */ IPushService pushService = TimerPushService.get(); /* * 3. install push node into this panel */ IPushNode pushNode = pushService.installNode(this, handler); /* * 4. connect to the chat service and forward the Message events to the push node and it's event handler */ IChatService chatService = ServiceLocator.getChatService(); chatService.addListener(new IChatListener() { public void onMessage(Message msg) { if (pushService.isConnected(pushNode)) // forward the Message event via the push service to the push event handler pushService.publish(pushNode, msg); else chatService.removeListener(this); } }); } ``` -------------------------------- ### Run Demo Application Source: https://github.com/wicketstuff/core/blob/master/dashboard-parent/README.md Commands to install and run the demo application using Maven and Jetty. ```bash mvn install cd demo mvn jetty:run ``` -------------------------------- ### Build the Project with Maven Source: https://github.com/wicketstuff/core/blob/master/wicket-security-parent/README.md Use this Maven command to clean and install the project dependencies and build the project. ```bash mvn clean install ``` -------------------------------- ### Installation Source: https://github.com/wicketstuff/core/blob/master/select2-parent/README.md Instructions on how to add the Wicketstuff Select2 dependency to your Maven project. ```APIDOC ## Installation ### Description Add the Wicketstuff Select2 dependency to your project's pom.xml file. ### Method Maven Dependency ### Endpoint N/A ### Parameters N/A ### Request Example ```xml org.wicketstuff wicketstuff-select2 ... ``` ### Response N/A ``` -------------------------------- ### Apply Security and Mount Annotations to Pages Source: https://github.com/wicketstuff/core/wiki/Servlet-Container-Authentication-and-Authorization Examples of applying @MountPath and @AuthorizeInstantiation at the class and package levels. ```java @MountPath("index.html") public class HomePage extends BasePage @MountPath("secure/admin/admin.html") @AuthorizeInstantiation({"tomcat", "admin"}) public class AdminPage extends BasePage /** This is in package-info.java **/ @AuthorizeInstantiation({"tomcat", "role1", "admin"}) package org.wicketstuff.servlet3.secure.example.ui.pkgExample; /** This a class in the same package */ package org.wicketstuff.servlet3.secure.example.ui.pkgExample; public class Page3 extends BasePage { @AuthorizeInstantiation({"tomcat", "role1", "admin"}) public class Page2 extends BasePage ``` -------------------------------- ### Basic SwarmWebApplication Extension Source: https://github.com/wicketstuff/core/wiki/Wicket-Security---3.-Getting-started Extend SwarmWebApplication to handle core security setup. You must implement getHiveKey, setUpHive, getHomePage, and getLoginPage. ```java package org.apache.wicket.security.examples.multilogin; public class MyApplication extends SwarmWebApplication { public MyApplication() { } @Override protected Object getHiveKey() { // TODO Auto-generated method stub return null; } @Override protected void setUpHive() { // TODO Auto-generated method stub } @Override public Class getHomePage() { // TODO Auto-generated method stub return null; } @Override public Class getLoginPage() { // TODO Auto-generated method stub return null; } } ``` -------------------------------- ### Component Permission Example Source: https://github.com/wicketstuff/core/wiki/Wicket-Security---3.-Getting-started An example of a permission grant within a hive policy file, specifying component access rights. ```java grant { permission org.apache.wicket.security.hive.authorization.permissions.ComponentPermission "org.apache.wicket.security.examples.multilogin.pages.HomePage", "inherit, render"; ``` -------------------------------- ### Various @Context Injection Examples Source: https://github.com/wicketstuff/core/wiki/projects/Context Provides examples of injecting different types of objects using the @Context annotation, including components, interfaces, collections, models, and qualified instances. ```java @Context Component component; @Context SomeInterface componentThatImplementsTheInterface; @Context Set setOfComponents; @Context List listOfComponents; @Context Set setOfComponents; @Context List setOfComponents; @Context(qualifier="imp") Set