reiern70 commented on a change in pull request #479:
URL: https://github.com/apache/wicket/pull/479#discussion_r747238529
##########
File path:
wicket-native-websocket/wicket-native-websocket-core/src/main/java/org/apache/wicket/protocol/ws/api/BaseWebSocketBehavior.java
##########
@@ -120,9 +120,21 @@ protected String getWebSocketSetupScript(Map<String,
Object> parameters) {
return webSocketSetupTemplate.asString(parameters);
}
+ /**
+ * Override to return a context. By default, this is the page class
name.
+ *
+ * @param component the {@link org.apache.wicket.Component}
+ * @return the context for this websocket behavior.
+ */
+ protected String getContext(Component component) {
+ return component.getPage().getClass().getName();
+ }
+
private Map<String, Object> getParameters(Component component) {
Map<String, Object> variables = Generics.newHashMap();
+ variables.put("context",
component.getPage().getClass().getName());
Review comment:
Thanks for spotting this. Added factory method and forgot referencing
here
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]