Package org.w3c.dom.html

Examples of org.w3c.dom.html.HTMLIFrameElement


    {
        Document doc = itsNatDoc.getDocument();
        ItsNatComponentManager componentMgr = itsNatDoc.getItsNatComponentManager();
        HTMLInputElement inputElem = (HTMLInputElement)doc.getElementById("fileUploadInputId");
        this.input = (ItsNatHTMLInputFile)componentMgr.findItsNatComponent(inputElem);
        HTMLIFrameElement iframeElem = (HTMLIFrameElement)doc.getElementById("fileUploadIFrameId");
        this.iframe = (ItsNatHTMLIFrame)componentMgr.findItsNatComponent(iframeElem);
        HTMLButtonElement buttonElem = (HTMLButtonElement)doc.getElementById("fileUploadButtonId");
        this.button = (ItsNatHTMLButton)componentMgr.findItsNatComponent(buttonElem);
        button.addEventListener("click", this);
    }
View Full Code Here


        {
            public void handleEvent(Event evt)
            {
                removeButton(); // Por si estuviera arriba de una prueba

                HTMLIFrameElement newIFrame = (HTMLIFrameElement)iframe.cloneNode(true); // El objeto "bind" interno obviamente NO se clonar�
                Node parentNode = iframe.getParentNode();
                parentNode.replaceChild(newIFrame, iframe);

                iframe = newIFrame;
            }
View Full Code Here

        this.idObj = clientDoc.getUniqueIdGenerator().generateUniqueId("ifur"); // ifur = IFrame File Upload Request

        if (!DOMUtilHTML.isHTMLInputFile(inputElem))
            throw new ItsNatException("Expected an <input type='file'> element");

        HTMLIFrameElement iframeElem = comp.getHTMLIFrameElement();
        String targetName = iframeElem.getAttribute("name");
        if (DOMUtilInternal.isNodeInside(iframeElem,null))
        {
            // Una restricci�n de seguridad que tienen los navegadores es que el
            // atributo name del iframe no puede definirse/cambiarse de forma efectiva
            // tras la inserci�n (o bien tras la carga del elemento desde markup),
            // mejor dicho, se cambia, pero dicho nuevo nombre no es v�lido como
            // target de un form, el inicial es el que sigue siendo v�lido.
            if (targetName.equals("")) // Ya no podemos imponerlo nosotros, no funcionar�a
                throw new ItsNatDOMException("Expected a non-empty attribute name",iframeElem);
        }
        else
        {
            // Insertamos en el documento definiendo un name si es necesario
            // Recuerda que en MSIE el name se define en el createElement("<iframe name='...'>")
            if (targetName.equals(""))
                targetName = "itsnat_iffu_" + idObj.getId(); // iffu = IFrame File Upload
            iframeElem.setAttribute("name",targetName)// Necesario
            Element rootElem = getItsNatStfulDocument().getVisualRootElement();
            rootElem.appendChild(iframeElem);
        }

        // Llegados a este punto es seguro que el <iframe> est� en el documento
View Full Code Here

        ItsNatStfulDocumentImpl itsNatDoc = clientDoc.getItsNatStfulDocument();
        synchronized(itsNatDoc) // Sincronizamos pues es apenas el �nico m�todo que se puede llamar y es llamado sin error durante la carga del archivo
        {
            if (disposed) return;

            HTMLIFrameElement iframeElem = comp.getHTMLIFrameElement();
            DocMutationEventListenerImpl mainListener = clientDoc.getItsNatStfulDocument().getDocMutationEventListener();
            mainListener.removeBeforeAfterMutationRenderListener(iframeElem,this);

            clientDoc.removeHTMLIFrameFileUploadImpl(this);
            comp.removeHTMLIFrameFileUploadImpl(this);
View Full Code Here

TOP

Related Classes of org.w3c.dom.html.HTMLIFrameElement

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.