OW2 Consortium telosys

Rev

Blame | Last modification | View Log | RSS feed

package org.objectweb.telosys.uil.taglib.widget;

import org.objectweb.telosys.uil.taglib.Page;
import org.objectweb.telosys.uil.taglib.TagCommons;
import org.objectweb.telosys.uil.taglib.widget.html.ScreenBodyHTML;
import org.objectweb.telosys.uil.taglib.widget.xul.ScreenBodyXUL;

/**
 * @author Laurent GUERIN
 * 
 */
public class ScreenBody extends GenericTag
{
    private static final String TAG_NAME = "screenbody";
    //----------------------------------------------------------------
    // TAG generators ( thread safe => static )
    //----------------------------------------------------------------
    private final static IWidget $htmlGen = new ScreenBodyHTML();

    private final static IWidget $xulGen  = new ScreenBodyXUL();

    //----------------------------------------------------------------
    // TAG attributes
    //----------------------------------------------------------------

    private String               _sData  = null;


    /**
     * Constructor
     */
    public ScreenBody()
    {
        super(TAG_NAME, $htmlGen, $xulGen);
    }    

    //----------------------------------------------------------------
    public void setData(String v)
    {
        _sData = v;
    }
    public String getData()
    {
        return _sData ;
    }

            
    public int doStartTag()
    {
        TagCommons.initScreenEnv(pageContext);
        //--- Clear the dynamic javascript lines 
        Page.clearJavascriptLines(pageContext);
        //--- Set (or clear) the current default data element
        Page.setDefaultDataElement(pageContext, _sData );
        //----------------------------------------------------------------
        startTag();
        
        return (EVAL_BODY_INCLUDE);
    }

    //----------------------------------------------------------------
    // Fermeture du TAG
    //----------------------------------------------------------------
    public int doEndTag()
    {
        endTag();
        Page.clearJavascriptLines(pageContext);
        return (EVAL_PAGE); 
        //  EVAL_PAGE = continue , SKIP_PAGE = abort the processing
    }

}

Generated by GNU enscript 1.6.4.