/** * Directly sends JavaScript code to all nodes listeing to the given push channel via a cometd * channel without an additional Wicket AJAX request roundtrip. */ @SuppressWarnings("unchecked") public <EventType> void publishJavascript(final PushChannel<EventType> channel, final String javascript) { if (channel == null) throw new IllegalArgumentException("Argument [channel] must not be null"); final Set<IPushNode<?>> pnodes = nodesByChannels.get(channel); if (pnodes == null) throw new IllegalArgumentException("Unknown channel " + channel); // publish the event to all registered nodes for (final IPushNode<?> node : pnodes) publishJavascript((CometdPushNode<EventType>)node, javascript); }