Examples of ClientDocument


Examples of org.itsnat.core.ClientDocument

            return;
        }
       
        if (!itsNatDoc.isLoading())
        {
            ClientDocument clientDoc = itsNatDoc.getClientDocumentOwner();
            String contentParentRef = clientDoc.getScriptUtil().getNodeReference(contentParentElem);           
            clientDoc.addCodeToSend("removeChildren(" + contentParentRef + ");")// ".innerHTML = '';"
        }
       
        //ItsNatDOMUtil.removeAllChildren(contentParentElem);

        // Setting new state:
View Full Code Here

Examples of org.itsnat.core.ClientDocument

                ((EventTarget)tabElem).dispatchEvent(event2); // Select tab

                if (useJoystick) joystickCB.setSelected(true);
            }
        };
        ClientDocument client = itsNatDoc.getClientDocumentOwner();
        client.startEventDispatcherThread(dispCode);
    }
View Full Code Here

Examples of org.itsnat.core.ClientDocument

        return "overview.showpopup";
    }

    public static void dispose(SPITutStateOverview parent)
    {
        ClientDocument clientDoc = parent.getItsNatHTMLDocument().getClientDocumentOwner();
        clientDoc.addCodeToSend("removeById('overviewPopupLayerContainerId');");
        clientDoc.addCodeToSend("removeById('overviewPopupContentContainerId');");
    }
View Full Code Here

Examples of org.itsnat.core.ClientDocument

            detailMoreLink.setTextContent("Hide");
            detailMoreLink.setAttribute("action","lessDetail");
        }
        else
        {
            ClientDocument clientDoc = getItsNatHTMLDocument().getClientDocumentOwner();
            clientDoc.addCodeToSend("removeById('detailContentId');");
                     
            detailMoreLink.setTextContent("More Detail");  
            detailMoreLink.setAttribute("action","moreDetail");           
        }
    }
View Full Code Here

Examples of org.itsnat.core.ClientDocument

    public void thisDocument()
    {
        ItsNatDocument itsNatDoc = getItsNatDocument();
        Document doc = itsNatDoc.getDocument();
        ItsNatVariableResolver resolver = itsNatDoc.createItsNatVariableResolver();
        ClientDocument owner = itsNatDoc.getClientDocumentOwner();
        ItsNatHttpSession itsNatSession = (ItsNatHttpSession)owner.getItsNatSession();
        HttpSession session = itsNatSession.getHttpSession();
        session.setAttribute("sessionId",itsNatSession.getId());
        itsNatDoc.setAttribute("docId",itsNatDoc.getId());
        resolver.setLocalVariable("refreshInterval",new Integer(3000));
        resolver.setLocalVariable("commMode",new Integer(CommMode.XHR_ASYNC));
View Full Code Here

Examples of org.itsnat.core.ClientDocument

    public RemoteControlTimerMgrGlobalEventListener(ItsNatDocument itsNatDoc)
    {
        this.itsNatDoc = itsNatDoc;
        this.lastNonTimerEvent = System.currentTimeMillis();

        ClientDocument clientDoc = itsNatDoc.getClientDocumentOwner();
        this.timer = clientDoc.createItsNatTimer();
        scheduleTimer();
    }
View Full Code Here

Examples of org.itsnat.core.ClientDocument

    }

    public void handleEvent(Event evt)
    {
        final ItsNatDocument itsNatDoc = getItsNatDocument();
        ClientDocument clientDoc = ((ItsNatEvent)evt).getClientDocument();

        final Runnable task = new Runnable()
        {
            public void run()
            {
                try
                {
                    Thread.sleep(4000);
                }
                catch(InterruptedException ex) { }

                synchronized(itsNatDoc)
                {
                    log("Asynchronous task finished, id: " + hashCode());
                }
            }
        };

        EventListener listener = new EventListener()
        {
            public void handleEvent(Event evt)
            {
                log("Finished really, id: " + task.hashCode());
            }
        };
        clientDoc.addAsynchronousTask(task,listener);

        log("An asynchronous task has started, id: " + task.hashCode());
    }
View Full Code Here

Examples of org.itsnat.core.ClientDocument

        Document doc = itsNatDoc.getDocument();       
       
        Element elemParent = doc.getElementById("insertHereId");
        ScriptUtil scriptGen = itsNatDoc.getScriptUtil();
        String elemRef = scriptGen.getNodeReference(elemParent);
        ClientDocument clientDoc = itsNatEvt.getClientDocument();
        clientDoc.addCodeToSend(elemRef + ".innerHTML = '';");       
        clientDoc.addCodeToSend("alert('Currently inserted fragment removed before');");       
               
        ItsNatServlet servlet = itsNatDoc.getItsNatDocumentTemplate().getItsNatServlet()
        ItsNatHTMLDocFragmentTemplate docFragTemplate = (ItsNatHTMLDocFragmentTemplate)servlet.getItsNatDocFragmentTemplate("manual.stless.example.fragment")

        DocumentFragment docFrag = docFragTemplate.loadDocumentFragmentBody(itsNatDoc)
View Full Code Here

Examples of org.itsnat.core.ClientDocument

    {
        ItsNatEventStateless itsNatEvt = (ItsNatEventStateless)evt;
       
        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('Received stateless event with not found itsnat_doc_name: " + docName + " from the page with title: " + itsNatEvt.getExtraParam("title") + "');");
            else
                clientDoc.addCodeToSend("alert('Received a custom stateless event from the page with title: " + itsNatEvt.getExtraParam("title") + "');");
        }
    }
View Full Code Here

Examples of org.itsnat.core.ClientDocument

                log("OK this is the title: " + title + " ");
            }
        };

        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
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.