Examples of ItsNatStfulDocumentImpl


Examples of org.itsnat.impl.core.doc.ItsNatStfulDocumentImpl

    }
   
    public String generateFrameworkScriptElement(String jsFileNameList,final int loaderScriptNum)
    {
        Element scriptElem = createFrameworkScriptElement(jsFileNameList,loaderScriptNum);
        ItsNatStfulDocumentImpl itsNatDoc = getItsNatStfulDocument();
        return itsNatDoc.serializeNode(scriptElem);
    }
View Full Code Here

Examples of org.itsnat.impl.core.doc.ItsNatStfulDocumentImpl

    protected abstract String getDocumentNamespace();

    protected Element createScriptElement(final int loaderScriptNum)
    {
        ItsNatStfulDocumentImpl itsNatDoc = getItsNatStfulDocument();
        Document doc = itsNatDoc.getDocument();

        Element script = doc.createElementNS(getDocumentNamespace(),"script");

        DOMUtilInternal.setAttribute(script,"type",getJavaScriptMIME());
        DOMUtilInternal.setAttribute(script,"id","itsnat_load_script_" + Integer.toString(loaderScriptNum));
View Full Code Here

Examples of org.itsnat.impl.core.doc.ItsNatStfulDocumentImpl

    }

    protected String generateInitScriptElementCode(final int prevScriptsToRemove)
    {
        Element scriptElem = createInitScriptElement(prevScriptsToRemove);
        ItsNatStfulDocumentImpl itsNatDoc = getItsNatStfulDocument();
        return itsNatDoc.serializeNode(scriptElem);
    }
View Full Code Here

Examples of org.itsnat.impl.core.doc.ItsNatStfulDocumentImpl

        return itsNatDoc.serializeNode(scriptElem);
    }

    protected Element createInitScriptElement(final int prevScriptsToRemove)
    {
        ItsNatStfulDocumentImpl itsNatDoc = getItsNatStfulDocument();

        // Hacemos un truco para evitar que se definan variables globales
        // al ejecutar el script de carga, pues las variables dentro del <script>
        // declaradas como var myvar = ... son inevitablemente globales (asociadas a window)
        // As� evitamos enlazar a window objetos que ser�n temporales
        // El truco de meter la funci�n entre par�ntesis lo usa por ejemplo SVGWeb
        // M�s info sobre memory leaks en MSIE:
        // http://msdn.microsoft.com/en-us/library/bb250448%28VS.85%29.aspx

        // Esto es por ejemplo un gran problema para Batik como applet:
        // http://old.nabble.com/Cache-entry-not-found---slows-drawing-display-td21562669.html
        // http://www.nabble.com/FW%3A-Strange-applet-delay-revisited-to21494010.html
        // http://old.nabble.com/attachment/21502224/0/disable-rhino-class-loader.patch
        // Este problema se puede ver en la consola de los applets poniendo un nivel de rastreo 2 ("red")
        // (obviamente sin aplicar la soluci�n).
        // Estas declaraciones de paquetes globales que se citan en Internet
        // se realizan en el constructor de RhinoInterpreter.java
        // evitando variables globales minimizamos el problema

        StringBuilder code = new StringBuilder();

        Browser browser = getClientDocumentStful().getBrowser();
        boolean enclosing = browser.isFunctionEnclosingByBracketSupported();

        if (enclosing)
            code.append("(function(){\n");

        code.append( getInitScriptContentCode(prevScriptsToRemove) + "\n" );

        if (enclosing)
            code.append("})();"); // As� la propia funci�n tampoco no es global

        Element scriptElem = createScriptElement(prevScriptsToRemove);

        boolean loadScriptInline = itsNatDoc.isLoadScriptInline();
        if (loadScriptInline)
        {
            setScriptContent(scriptElem,code.toString());
        }
        else
View Full Code Here

Examples of org.itsnat.impl.core.doc.ItsNatStfulDocumentImpl

    }

    protected String getInitJSDocumentCode(final int prevScriptsToRemove)
    {
        ClientDocumentStfulImpl clientDoc = getClientDocumentStful();
        ItsNatStfulDocumentImpl itsNatDoc = getItsNatStfulDocument();

        Browser browser = clientDoc.getBrowser();
        int browserType = browser.getTypeCode();
        int browserSubType = browser.getSubTypeCode();
        ItsNatSessionImpl itsNatSession = clientDoc.getItsNatSessionImpl();
        String token = itsNatSession.getToken();
        String sessionId = itsNatSession.getId();
        String clientId = clientDoc.getId();
        String servletPath = delegByBrowser.getServletPathForEvents();

        int errorMode = itsNatDoc.getClientErrorMode();
        StringBuilder code = new StringBuilder();

        String attachType = null;
        if (clientDoc instanceof ClientDocumentAttachedClientImpl)
        {
View Full Code Here

Examples of org.itsnat.impl.core.doc.ItsNatStfulDocumentImpl

        ItsNatEventImpl itsNatEvt = (ItsNatEventImpl)evt;
        ItsNatServletImpl servlet = itsNatEvt.getItsNatServletRequestImpl().getItsNatServletImpl();

        servlet.getItsNatAttachedClientEventListenerList(listeners);

        ItsNatStfulDocumentImpl itsNatDoc = itsNatEvt.getItsNatStfulDocument();

        itsNatDoc.getItsNatDocumentTemplateImpl().getItsNatAttachedClientEventListenerList(listeners);

        itsNatDoc.getItsNatAttachedClientEventListenerList(listeners);
    }
View Full Code Here

Examples of org.itsnat.impl.core.doc.ItsNatStfulDocumentImpl

        return canInsertChildNodeAsMarkupIgnoringOther(parent,newChildNode,template); // En el caso de �nico hijo obviamente los dem�s se ignoran pues no hay m�s
    }

    protected InnerMarkupCodeImpl appendSingleChildNodeAsMarkup(Node newNode, ClientDocumentStfulImpl clientDoc)
    {
        ItsNatStfulDocumentImpl itsNatDoc = clientDoc.getItsNatStfulDocument();
        String newNodeMarkup = itsNatDoc.serializeNode(newNode);
        if (DOMUtilInternal.isTheOnlyChildNode(newNode))
        {
            // Caso de �nico nodo
            Element parent = (Element)newNode.getParentNode();
            return appendChildrenCodeAsMarkup(null,parent,newNodeMarkup,clientDoc);
View Full Code Here

Examples of org.itsnat.impl.core.doc.ItsNatStfulDocumentImpl

    }

    protected InnerMarkupCodeImpl appendChildrenAsMarkup(String parentVarName, Node parentNode, ClientDocumentStfulImpl clientDoc)
    {
        // Se supone que hay nodos hijo (si no no llamar).
        ItsNatStfulDocumentImpl itsNatDoc = clientDoc.getItsNatStfulDocument();
        StringBuilder childrenCode = new StringBuilder();

        if (parentNode.hasChildNodes())
        {
            Node child = parentNode.getFirstChild();
            while(child != null)
            {
                String nodeCode = itsNatDoc.serializeNode(child);
                childrenCode.append( nodeCode );

                child = child.getNextSibling();
            }
        }
View Full Code Here

Examples of org.itsnat.impl.core.doc.ItsNatStfulDocumentImpl

        ItsNatDocumentImpl itsNatDoc = getItsNatDocument();
        if (itsNatDoc.isReferrerPushEnabled()) // permitimos que el referrer, si existe, nos escriba en nuestro document o nos pase nuevos par�metros
        {
            ItsNatServletRequestImpl itsNatRequest = itsNatResponse.getItsNatServletRequestImpl();
            ItsNatStfulDocumentImpl itsNatDocRef = itsNatRequest.getItsNatStfulDocumentReferrer();
            if (itsNatDocRef != null) // Si referrer no hubiera estado activado devolver�a null
            {
                synchronized(itsNatDocRef) // por si acaso aunque en teor�a la p�gina "fue abandonada"
                {
                    itsNatDocRef.dispatchReferrerRequestListeners(itsNatRequest,itsNatResponse);
                }
            }
        }

        ItsNatDocumentTemplateImpl docTemplate = itsNatDoc.getItsNatDocumentTemplateImpl();
View Full Code Here

Examples of org.itsnat.impl.core.doc.ItsNatStfulDocumentImpl

            stopCellEditing();
        }
        else
        {
            ItsNatComponent compEditor = getCellEditorComponent();
            ItsNatStfulDocumentImpl itsNatDoc = (ItsNatStfulDocumentImpl)getItsNatDocument();
            ClientDocumentStfulImpl[] clientList = itsNatDoc.getAllClientDocumentStfulsCopy();
            for(int i = 0; i < clientList.length; i++)
            {
                ClientDocumentStfulImpl clientDoc = clientList[i];
                ItsNatCellEditorClientImpl editClient = ItsNatCellEditorClientImpl.getItsNatHTMLCellEditorClient(clientDoc.getBrowser(),compEditor);
                editClient.handleEvent(evt, this, clientDoc);
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.