Package org.w3c.dom.html

Examples of org.w3c.dom.html.HTMLDocument.createTextNode()


        this.itsNatDoc = itsNatDoc;
       
        // This is just an excuse to show how the initial page is a conventional ItsNat page
        // (but stateless)
        HTMLDocument doc = itsNatDoc.getHTMLDocument();
        Text node = (Text)doc.createTextNode("This the initial stateless page (not kept in server)");
        Element presentationElem = doc.getElementById("presentationId");
        presentationElem.appendChild(node);      
    }

View Full Code Here


        Text text2 = (Text)clickElem2.getFirstChild();
        text2.setData("Cannot be clicked");

        Element noteElem = doc.createElement("p");
        noteElem.appendChild(doc.createTextNode("Ready to receive clicks..."));
        doc.getBody().appendChild(noteElem);

        ((EventTarget)clickElem1).addEventListener("click",this,false);
    }
View Full Code Here

        ItsNatDocument itsNatDoc = itsNatReq.getItsNatDocument();

        HTMLDocument doc = (HTMLDocument)itsNatDoc.getDocument();
        Element noteElem = doc.createElement("p");
        noteElem.appendChild(
                doc.createTextNode("Clicked " + ((Element)currTarget).getAttribute("id")));
        doc.getBody().appendChild(noteElem);
    }

    public void setAsClickable(Element elem)
    {
View Full Code Here

        ItsNatDocument itsNatDoc = itsNatReq.getItsNatDocument();

        HTMLDocument doc = (HTMLDocument)itsNatDoc.getDocument();
        Element noteElem = doc.createElement("p");
        noteElem.appendChild(
                doc.createTextNode("Clicked " + ((Element)currTarget).getAttribute("id")));
        doc.getBody().appendChild(noteElem);
    }

    public void setAsClickable(Element elem)
    {
View Full Code Here

        Text text2 = (Text)clickElem2.getFirstChild();
        text2.setData("Cannot be clicked");

        Element noteElem = doc.createElement("p");
        noteElem.appendChild(doc.createTextNode("Ready to receive clicks..."));
        doc.getBody().appendChild(noteElem);

        ((EventTarget)clickElem1).addEventListener("click",this,false);
    }
View Full Code Here

        this.itsNatDoc = itsNatDoc;
       
        // This is just an excuse to show how the initial page is a conventional ItsNat page
        // (but stateless)
        HTMLDocument doc = itsNatDoc.getHTMLDocument();
        Text node = (Text)doc.createTextNode("This the initial stateless page (not kept in server)");
        Element presentationElem = doc.getElementById("presentationId");
        presentationElem.appendChild(node);      
    }
}
View Full Code Here

    public void handleEvent(Event evt)
    {
        HTMLDocument doc = (HTMLDocument)itsNatDoc.getDocument();
        Element p = doc.createElement("p");
        p.appendChild(doc.createTextNode("Clicked"));
        doc.getBody().appendChild(p);
    }

}
View Full Code Here

    public void handleEvent(Event evt)
    {
        HTMLDocument doc = itsNatDoc.getHTMLDocument();
        Element infoElem = doc.createElement("div");
        infoElem.appendChild(doc.createTextNode("clicked"));
        logElem.appendChild(infoElem);
    }
}
View Full Code Here

        HTMLDocument doc = (HTMLDocument)itsNatDoc.getDocument();
        Element elem = doc.getElementById("nameTestId");
        Element anchor = doc.createElement("a");
        anchor.setAttribute("name","nameExample");
        anchor.appendChild(doc.createTextNode("anchor"));
        elem.appendChild(anchor); // El padre tiene ya un nodo de texto se evita que se use innerHTML que no nos interesa
    }

}
View Full Code Here

    public void outText(String msg)
    {
        HTMLDocument doc = (HTMLDocument)itsNatDoc.getDocument();
        Element parent = doc.getElementById("logId");
        parent.appendChild(doc.createTextNode(msg)); // Para que se vea
    }

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