List of usage examples for org.apache.wicket.protocol.ws.api.message ConnectedMessage toString
@Override public final String toString()
From source file:com.googlecode.wicket.jquery.ui.plugins.whiteboard.Whiteboard.java
License:Apache License
/** * Creating a whiteboard instance for given element id * @param id//from ww w. jav a 2s . com */ public Whiteboard(String id, String whiteboardContent) { super(id); //Adding Web Socket behaviour to handle synchronization between whiteboards this.add(new WebSocketBehavior() { private static final long serialVersionUID = -3311970325911992958L; @Override protected void onConnect(ConnectedMessage message) { super.onConnect(message); log.debug("Connecting :" + message.toString()); } @Override protected void onClose(ClosedMessage message) { super.onClose(message); log.debug("Disconnecting :" + message.toString()); } }); WebMarkupContainer whiteboard = new WebMarkupContainer("whiteboard"); this.add(whiteboard); WhiteboardBehavior whiteboardBehavior = new WhiteboardBehavior("whiteboard", whiteboardContent); this.add(whiteboardBehavior); }
From source file:org.wicketstuff.whiteboard.Whiteboard.java
License:Apache License
/** * This is the constructor which used to create a whiteboard in a wicket application * // w w w. j ava 2 s. co m * @param markupId * html element markupId which holds the whiteboard * @param whiteboardContent * If loading from a saved whiteboard file, content should be provided as a string. Otherwise null * @param clipArtFolderPath * Path of the folder which holds clipArts which can be added to whiteboard. Relative to context root * @param docFolderPath * Path of the folder which holds docs images which can be added to whiteboard. Relative to context root */ public Whiteboard(String whiteboardID, String markupId, String whiteboardContent, String clipArtFolderPath, String docFolderPath) { super(markupId); // Adding Web Socket behaviour to handle synchronization between whiteboards this.add(new WebSocketBehavior() { private static final long serialVersionUID = -3311970325911992958L; @Override protected void onConnect(ConnectedMessage message) { super.onConnect(message); log.debug("Connecting :" + message.toString()); } @Override protected void onClose(ClosedMessage message) { super.onClose(message); log.debug("Disconnecting :" + message.toString()); } }); add(new WebMarkupContainer("whiteboard")); add(new WhiteboardBehavior(whiteboardID, "whiteboard", whiteboardContent, clipArtFolderPath, docFolderPath)); }