1 20 package org.enhydra.barracuda.examples.ex4; 21 22 import java.io.*; 23 import java.util.*; 24 import java.net.*; 25 import javax.servlet.*; 26 import javax.servlet.http.*; 27 28 import org.enhydra.barracuda.core.event.*; 29 import org.enhydra.barracuda.examples.ex4.events.*; 30 31 32 35 public class SampleScreen extends DefaultEventGateway { 36 37 public ListenerFactory testFactory = new DefaultListenerFactory() {public BaseEventListener getInstance() {return new TestHandler();} public String getListenerID() {return getID(TestHandler.class);}}; 38 39 46 class TestHandler extends DefaultBaseEventListener { 47 public void handleControlEvent(ControlEventContext context) throws EventException, ServletException, IOException { 48 context.putState(SampleViewHandler.HANDLED_BY, "Sample Screen Handler"); 51 context.getQueue().addEvent(new RenderEvent(context.getEvent())); 52 } 53 } 54 } 55 56 | Popular Tags |