Examples of CannotInsertAsMarkupCauseImpl


Examples of org.itsnat.impl.core.jsren.dom.node.CannotInsertAsMarkupCauseImpl

        return true;
    }

    public CannotInsertAsMarkupCauseImpl canInsertAllChildrenAsMarkup(Element parent,MarkupTemplateVersionImpl template,InsertAsMarkupInfoImpl insertMarkupInfo)
    {
        CannotInsertAsMarkupCauseImpl cannotInsertMarkup = super.canInsertAllChildrenAsMarkup(parent,template,insertMarkupInfo);
        if (cannotInsertMarkup != null)
            return cannotInsertMarkup;

        // Debe haber al menos un Element como hijo para que valga la pena
        // usar serializaci�n y parsing con DOMRender
        // Hay que tener en cuenta que DOMRender no es como una simple llamada a innerHTML

        if (parent.hasChildNodes())
        {
            Node child = parent.getFirstChild();
            while(child != null)
            {
                if (child.getNodeType() == Node.ELEMENT_NODE)
                    return null; // S� merece la pena insertar como markup

                child = child.getNextSibling();
            }
        }
       
        return new CannotInsertAsMarkupCauseImpl(parent); // No merece la pena
    }
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.