Package org.itsnat.impl.core.clientdoc

Examples of org.itsnat.impl.core.clientdoc.NodeCacheRegistryImpl


        // de otra manera este test no sirve para nada
        HTMLElement body = itsNatDoc.getHTMLDocument().getBody();
        ClientDocumentStfulImpl clientDoc = (ClientDocumentStfulImpl)itsNatDoc.getClientDocumentOwner();
        clientDoc.removeNodeFromCacheAndSendCode(body);
        // Nos aseguramos
        NodeCacheRegistryImpl nodeCache = clientDoc.getNodeCacheRegistry();
        if (nodeCache.getId(body) != null) throw new RuntimeException("Unexpected Error");

        String refBody = itsNatDoc.getScriptUtil().getNodeReference(body);

        code = new StringBuilder();
        code.append("  var elem = " + refBody + ";" );
View Full Code Here


        Element validChildElem2 = doc.createElement("textarea"); // Para que si algo falla sea muy visible en el documento (por defecto suele ser un "text")
        parentNode.insertBefore(validChildElem2,validChildElem1);

        ClientDocumentStfulImpl clientDoc = (ClientDocumentStfulImpl)itsNatDoc.getClientDocumentOwner();
        // Es necesario acceder a las tripas de ItsNat para asegurarnos que est� cacheado
        NodeCacheRegistryImpl nodeCache = clientDoc.getNodeCacheRegistry();
        if (nodeCache.getId(validChildElem1) == null// DEBE estar cacheado aunque est� reci�n insertado, en eso consiste la protecci�n
            throw new RuntimeException("Unexpected Error");
        if (nodeCache.getId(validChildElem2) == null// DEBE estar cacheado aunque est� reci�n insertado, en eso consiste la protecci�n
            throw new RuntimeException("Unexpected Error");

        String refValidChildElem1 = itsNatDoc.getScriptUtil().getNodeReference(validChildElem1);
        String refValidChildElem2 = itsNatDoc.getScriptUtil().getNodeReference(validChildElem2);
View Full Code Here

TOP

Related Classes of org.itsnat.impl.core.clientdoc.NodeCacheRegistryImpl

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.