Package test.stateless

Source Code of test.stateless.TestCoreStatelessGlobalEventListenerAction

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package test.stateless;

import org.itsnat.core.ClientDocument;
import org.itsnat.core.event.ItsNatEventStateless;

/**
*
* @author jmarranz
*/
public class TestCoreStatelessGlobalEventListenerAction
{
    public static void handleEvent(ItsNatEventStateless itsNatEvt)
    {
        if (itsNatEvt.getItsNatDocument() == null)
        {
            ClientDocument clientDoc = itsNatEvt.getClientDocument();               
            //ServletRequest request = itsNatEvt.getItsNatServletRequest().getServletRequest();
            String docName = (String)itsNatEvt.getExtraParam("itsnat_doc_name");
            if (docName != null)
                clientDoc.addCodeToSend("alert('Stateless event OK with not found itsnat_doc_name: " + docName + " and title " + itsNatEvt.getExtraParam("title") + "');");
            else
                clientDoc.addCodeToSend("alert('Custom stateless event OK and title " + itsNatEvt.getExtraParam("title") + "');");                            
        }
    }
}
TOP

Related Classes of test.stateless.TestCoreStatelessGlobalEventListenerAction

TOP
Copyright © 2018 www.massapi.com. 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.