Package test.shared

Examples of test.shared.TestGlobalEventListener


        itsNatConfig.setDefaultDateFormat(DateFormat.getTimeInstance(DateFormat.LONG,Locale.US));
        itsNatConfig.setDefaultNumberFormat(NumberFormat.getNumberInstance(Locale.US));

       
        itsNatServlet.addItsNatServletRequestListener(new TestGlobalDocumentLoadListener());
        itsNatServlet.addEventListener(new TestGlobalEventListener(itsNatServlet));
        itsNatServlet.addItsNatAttachedClientEventListener(new TestGlobalRemoteControlListener());

        String pathPrefix = getServletContext().getRealPath("/") + "/WEB-INF/pages/test/";
        Properties pages = loadProperties(pathPrefix + "pages.properties");

        ItsNatDocumentTemplate docTemplate;


        docTemplate = registerDocument("test_core","text/html",pathPrefix,pages); // "application/xhtml+xml"  "text/html"
        docTemplate.addItsNatServletRequestListener(new TestCoreDocLoadListener());
        docTemplate.addItsNatAttachedClientEventListener(new TestRemoteControlListener(false));
        docTemplate.addEventListener(new TestGlobalEventListener(docTemplate));
        //docTemplate.setReferrerEnabled(true);

        docTemplate = registerDocument("test_core_attached_server_launcher","text/html",pathPrefix,pages)// "application/xhtml+xml"  "text/html"
        // El motivo de este template es para poder generar una p�gina con un template complejo
        // evitando hacer una copia como HTML est�tico, pero el template tiene <comment> e <include>
        // que no se resuelven en modo "attached server" porque el template "es la p�gina cliente"
        // y en general renderizaci�n inicial que no ser� posible al hacer el attachment.
        docTemplate.addItsNatServletRequestListener(new TestCoreAttachServerLauncherDocLoadListener());
        docTemplate.setScriptingEnabled(false);
        docTemplate.setFastLoadMode(true); // FUNDAMENTAL para a�adir los <script> de attachment a la p�gina inicial

        docTemplate = itsNatServlet.registerItsNatDocumentTemplateAttachedServer("test_core_attached_server","text/html")// "application/xhtml+xml"  "text/html"
        docTemplate.addItsNatServletRequestListener(new TestCoreDocLoadListener());
        docTemplate.addItsNatAttachedClientEventListener(new TestRemoteControlListener(false));
        docTemplate.addEventListener(new TestGlobalEventListener(docTemplate));
        docTemplate.setCommMode(CommMode.SCRIPT_HOLD)// SCRIPT_HOLD ser� lo normal en attached server

        docTemplate = registerDocument("test_core_iframe","text/html",pathPrefix,pages); // "application/xhtml+xml"  "text/html"
        docTemplate.addItsNatServletRequestListener(new TestCoreIFrameDocLoadListener());
        docTemplate.addItsNatAttachedClientEventListener(new TestRemoteControlListener(false));
View Full Code Here

TOP

Related Classes of test.shared.TestGlobalEventListener

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.