Package org.itsnat.core.event

Examples of org.itsnat.core.event.CustomParamTransport


            doc.removeChild(docType);
        }

        this.svgElem = doc.getElementById("svgId");
        ParamTransport[] params = new ParamTransport[]
            { new CustomParamTransport("offsetX","event.getNativeEvent().offsetX"),
              new CustomParamTransport("offsetY","event.getNativeEvent().offsetY") };
        itsNatDoc.addEventListener(((EventTarget)svgElem),"click",this,false,params);

        ElementGroupManager egm = itsNatDoc.getElementGroupManager();
        Element circleListElem = doc.getElementById("circleListId");
        this.circleList = egm.createElementList(circleListElem,false);
View Full Code Here


            return RELOAD_CODE_NORMAL;
    }

    public static ParamTransport[] createExtraParams()
    {
        return new ParamTransport[] { new CustomParamTransport("itsnat_check_reload","true") };
    }
View Full Code Here

    {
    }

    public String getCodeToSend(ParamTransport param)
    {
        CustomParamTransport item = (CustomParamTransport)param;
        return "    event.setExtraParam(\"" + item.getName() + "\"," + item.getScriptCode() + ");\n";
    }
View Full Code Here

                        monitor.notifyAll(); // Desbloquea el hilo dispatcher de eventos
                    }
                    itsNatDoc.lockThread(evtDispMaxWait); // Bloquea el hilo del request/response para una posible siguiente llamada a dispatchEvent
                }
            };
            CustomParamTransport param = new CustomParamTransport("itsnat_res","res");
            addContinueEventListener(null,listener,commMode,new ParamTransport[]{param},null,eventTimeout);

            itsNatDoc.notifyAll()// Desbloquea el hilo del request/response para que se env�e el c�digo al browser
        }
View Full Code Here

            public void handleEvent(Event evt)
            {
                throw new RuntimeException("Must be catched by global");
            }
        };
        itsNatDoc.addEventListener((EventTarget)linkToStart,"click",listeners[0],false,new CustomParamTransport("num","1"));

        listeners[1] = new EventListener() // Second listener
        {
            public void handleEvent(Event evt)
            {
                log("Second listener executed");
            }
        };
        itsNatDoc.addEventListener((EventTarget)linkToStart,"click",listeners[1],false,new CustomParamTransport("num","2"));

        listeners[2] = new EventListener() // Third listener
        {
            public void handleEvent(Event evt)
            {
                throw new RuntimeException("NEVER THROWN!");
            }
        };
        itsNatDoc.addEventListener((EventTarget)linkToStart,"click",listeners[2],false,new CustomParamTransport("num","3"));
    }
View Full Code Here

            }
        };

        ItsNatEvent itsNatEvent = (ItsNatEvent)evt;
        ClientDocument clientDoc = itsNatEvent.getClientDocument();
        ParamTransport[] extraParams = new ParamTransport[] { new CustomParamTransport("title","document.title") };
        clientDoc.addContinueEventListener(null,listener,itsNatEvent.getCommMode(),extraParams,null,-1);
    }
View Full Code Here

                ItsNatEvent itsNatEvt = (ItsNatEvent)evt;
                String title = (String)itsNatEvt.getExtraParam("title");
                System.out.println("Page title: " + title);
            }
        };
        ParamTransport extraParam = new CustomParamTransport("title","document.title");
        itsNatDoc.addEventListener((EventTarget)anElem,"click",anListener,false,new ParamTransport[]{ extraParam });
    }
View Full Code Here

                        String title = (String)contEvt.getExtraParam("title");
                        System.out.println("This is the title: " + title);
                    }
                };

                ParamTransport[] extraParams = new ParamTransport[] { new CustomParamTransport("title","document.title") };
                clientDoc.addContinueEventListener(null,listener,itsNatEvent.getCommMode(),extraParams,null,-1);
            }
        };
    }
View Full Code Here

                Text text = (Text)link.getFirstChild();
                text.setData(text.getData() + " => " + title);
            }
        };

        ParamTransport[] extraParams = new ParamTransport[] { new CustomParamTransport("title","document.title") };
        clientDoc.addContinueEventListener(null,listener,itsNatEvent.getCommMode(),extraParams,null,-1);
    }
View Full Code Here

    {
        if (isChangeEvent(type,clientDoc) ||
            type.equals("keyup"))
        {
            // Redefinimos porque es un poco m�s complicado que el c�digo por defecto
            CustomParamTransport value = new CustomParamTransport("value","event.getCurrentTarget().value");
            return new ParamTransport[]{value};
        }
        else
            return null;
    }
View Full Code Here

TOP

Related Classes of org.itsnat.core.event.CustomParamTransport

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.