Directory

SigSlotCustom - Vaadin Add-on Directory

realization of Signal-Slot paradigm for Vaadin SigSlotCustom - Vaadin Add-on Directory
Signal-Slot-Custom component for Vaadin This is realization of Signal-Slot paradigm for Vaadin, it's entry signal bus to application. Signal's may generated anywhere for 3 scope: Local - only for current instants Application - for current UI (thread) Deployment - for all UI in current container Server - for JMX propagation Also intoduce some CDI as @Resource(lookup="JNDI") implementation To work with this: 1. Add this add-on to project 2. Make own superclass of SigSlotComponent. Here is trivial chat application widget with signal-slot (as included in demo project) @Push public class Chat extends SigSlotComponent { private String name = null; private TextField query = new TextField(); @Signal("sendtext") public Button send = new Button("send"); private VerticalLayout text = new VerticalLayout(query,send); @Slot("sendtext") public void send(Object o) { if (name == null) name = query.getValue(); else signal(SignalScope.Deployment, "chatmessage", name + ":" + query.getValue()); query.setValue(""); } @Slot(value = "chatmessage", scope = SignalScope.Deployment) public void receiver(String message) { text.addComponent(new Label(message), text.getComponentIndex(query)); } public Chat() { setCompositionRoot(text); } }