Package org.itsnat.manual.stless

Source Code of org.itsnat.manual.stless.StlessExampleInitialDocument

/*
* This file is not part of the ItsNat framework.
*
* Original source code use and closed source derivatives are authorized
* to third parties with no restriction or fee.
* The original source code is owned by the author.
*
* This program is distributed AS IS in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* (C) Innowhere Software a service of Jose Maria Arranz Santamaria, Spanish citizen.
*/
package org.itsnat.manual.stless;


import org.itsnat.core.html.ItsNatHTMLDocument;
import org.w3c.dom.Element;
import org.w3c.dom.Text;
import org.w3c.dom.html.HTMLDocument;

public class StlessExampleInitialDocument
{
    protected ItsNatHTMLDocument itsNatDoc;

    public StlessExampleInitialDocument(ItsNatHTMLDocument itsNatDoc)
    {
        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);      
    }


}
TOP

Related Classes of org.itsnat.manual.stless.StlessExampleInitialDocument

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.