Package test.shared

Examples of test.shared.EventListenerSerial


        HTMLInputElement input2 = (HTMLInputElement)doc.createElement("input");
        input2.setAttribute("type","file");
        input2.setAttribute("value","Test TestInputFileInsertion");
        div.appendChild(input2); // Seguramente se usar� innerHTML

        EventListener listener = new EventListenerSerial()
        {
            public void handleEvent(Event evt)
            {
                // Limpiamos
                input1.getParentNode().removeChild(input1);
View Full Code Here


    {
        final Document doc = itsNatDoc.getDocument();
        this.link = doc.getElementById("testGlobalDOMListenerId");
        ((EventTarget)link).addEventListener("click",this,false);

        EventListener global = new EventListenerSerial()
        {
            public void handleEvent(Event evt)
            {
                if (evt.getCurrentTarget() != link) return;
                ItsNatEvent itsNatEvt = ((ItsNatEvent)evt);
                itsNatEvt.setUserValue("test_global_dom_listener_doc",Boolean.TRUE);
            }
        };
        itsNatDoc.addEventListener(global);


        global = new EventListenerSerial()
        {
            public void handleEvent(Event evt)
            {
                if (evt.getCurrentTarget() != link) return;
                ItsNatEvent itsNatEvt = ((ItsNatEvent)evt);
View Full Code Here

        if (false) // Poner a true si queremos detectar en modo fast load un uso ilegal, autoCleanEventListener y debugMode deben estar a true
        {
            HTMLDocument doc = (HTMLDocument)itsNatDoc.getDocument();
            Element elem = doc.createElement("div");
            doc.getBody().appendChild(elem);
            EventListener evtListener = new EventListenerSerial()
            {
                public void handleEvent(Event evt)
                {
                }
            };
View Full Code Here

    public void handleEvent(final Event evt)
    {
        ItsNatDOMStdEvent itsNatEvent = (ItsNatDOMStdEvent)evt;
        ClientDocument clientDoc = itsNatEvent.getClientDocument();

        EventListener listener = new EventListenerSerial()
        {
            public void handleEvent(Event evt)
            {
                ItsNatContinueEvent contEvt = (ItsNatContinueEvent)evt;
                String title = (String)contEvt.getExtraParam("title");
View Full Code Here

        final ItsNatHTMLDocument itsNatDoc = (ItsNatHTMLDocument)itsNatEvent.getItsNatDocument();
        outText("OK " + evt.getType() + " "); // Para que se vea

        final boolean lockDoc = (evt.getCurrentTarget() == buttonLock);

        final EventListener listener = new EventListenerSerial()
        {
            public void handleEvent(final Event evt)
            {
                outText("OK End Async Task Lock Doc: " + lockDoc + " 2-2 ");
            }
View Full Code Here

        code.append("if (elem.id != 'firebug_test') alert('ERROR TestFireBug');");
        code.append("else alert('OK TestFireBug');");
        code.append("}catch(ex){ alert('ERROR TestFireBug'); } \n");
        itsNatDoc.addCodeToSend(code.toString());

        EventListener listener = new EventListenerSerial()
        {
            public void handleEvent(Event evt)
            {
                // Limpiamos
                style.getParentNode().removeChild(style);
View Full Code Here

        HTMLDocument doc = itsNatDoc.getHTMLDocument();
        HTMLTableElement tableElem = (HTMLTableElement)doc.createElement("table");
        doc.getBody().appendChild(tableElem);

        EventListener listener = new EventListenerSerial()
        {
            public void handleEvent(Event evt) { }
        };

        ((EventTarget)tableElem).addEventListener("click",listener,false);
View Full Code Here

        if ((comet == null)||comet.isStopped())
        {
            this.comet = itsNatEvent.getClientDocument().createCometNotifier();
            //comet.setExpirationDelay(10000);

            EventListener listener = new EventListenerSerial()
            {
                public void handleEvent(Event evt)
                {
                    outText("OK Comet Event " + evt.getType() + " ");
                }
View Full Code Here

    public void load()
    {
        itsNatDoc.addUserEventListener(null,"update",this);

        Element checkServer = itsNatDoc.getDocument().getElementById("checkServerId");
        EventListener listener = new EventListenerSerial()
        {
            public void handleEvent(Event evt)
            {
                // Sirve para que actualice el cliente con los cambios en el servidor
            }
View Full Code Here

    public void handleEvent(Event evt)
    {
        ClientDocument clientDoc = ((ItsNatEvent)evt).getClientDocument();

        EventListener global = new EventListenerSerial()
        {
            public void handleEvent(Event evt)
            {
                ItsNatEvent itsNatEvt = ((ItsNatEvent)evt);
                ItsNatEventListenerChain chain = itsNatEvt.getItsNatEventListenerChain();
                try
                {
                    chain.continueChain();
                }
                catch(Exception ex)
                {
                    if (!ex.getMessage().equals("Must be catched"))
                        throw new RuntimeException("FAILED TEST");

                    Text text = (Text)link.getFirstChild();
                    text.setData(text.getData() + " => OK 1-2");
                    itsNatDoc.removeEventListener(this);
                }
            }
        };
        itsNatDoc.addEventListener(global)// Para despu�s, cuando se ejecute el evento continue

        EventListener contListener1 = new EventListenerSerial()
        {
            public void handleEvent(Event evt)
            {
                throw new RuntimeException("Must be catched");
            }
        };
        clientDoc.addContinueEventListener(null, contListener1);

        EventListener contListener2 = new EventListenerSerial()
        {
            public void handleEvent(Event evt)
            {
                Text text = (Text)link.getFirstChild();
                text.setData(text.getData() + " => OK 2-2");
View Full Code Here

TOP

Related Classes of test.shared.EventListenerSerial

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.