@@package@@

import java.io.Serializable;
import java.util.List;
import java.util.Map;

import org.eclnt.editor.annotations.CCGenClass;
import org.eclnt.jsfserver.pagebean.PageBeanComponentAsControlConfigItem;
import org.eclnt.jsfserver.pagebean.componentascontrol.PageBeanComponentAsControlWithAction;
import org.eclnt.jsfserver.util.valuemgmt.IValueDelegation;

/* ----------------------------------------------------------------------------

Example implementation of members serving as attributes:

    @attributeReference
    AttributeReferenceString m_heightRef = new AttributeReferenceString();
    @attributeReference
    AttributeReferenceString m_widthRef = new AttributeReferenceString("100%");
    ...
    
    public String getHeight() { return m_heightRef.getValue(); }
    public String getWidth() { return m_widthRef.getValue(); }
    ...

The component needs to be registered in diverse XML files:

1. Add component and attributes of component to cccontrollibrary.xml:

    <tag>
        <name>@@classname@@</name>
        <!-- default attributes -->
        <attribute><name>id</name></attribute>
        <attribute><name>rendered</name></attribute>
        <attribute><name>actionListener</name></attribute>
        <!-- if required...
        <attribute><name>pagebeanbinding</name></attribute>
        -->
        <!-- own attributes -->
        <attribute><name>width</name></attribute>
        <attribute><name>height</name></attribute>
        <attribute><name>...</name></attribute>
    </tag>

2. Add position of component to controlsarrangement.xml, example:

    <tag name="t:row" below="@@tldPrefix@@:@@classname@@"/>
    
3. Define mandatory attributes in controlattributeusage.xml.
4. Define favorite attributes in controlfavoriteattributes.xml.

---------------------------------------------------------------------------- */


@CCGenClass (expressionBase="@@expressionBase@@")
    
public class @@className@@
@@indent@@extends PageBeanComponentAsControlWithAction
@@indent@@implements Serializable
@@indent@@// implements Serializable, IPageBeanComponentAsControlImplicitlyCreateInstance
{
@@indent@@// ------------------------------------------------------------------------
@@indent@@// inner classes
@@indent@@// ------------------------------------------------------------------------
@@indent@@
@@indent@@/* Listener to the user of the page bean. */
@@indent@@public interface IListener extends Serializable
@@indent@@{
@@indent@@}
@@indent@@
@@indent@@// ------------------------------------------------------------------------
@@indent@@// members
@@indent@@// ------------------------------------------------------------------------
@@indent@@
@@indent@@// ------------------------------------------------------------------------
@@indent@@// constructors & initialization
@@indent@@// ------------------------------------------------------------------------

@@indent@@public @@className@@()
@@indent@@{
@@indent@@}

@@indent@@public String getRootExpressionUsedInPage() { return "@@expressionBase@@"; }

@@indent@@// ------------------------------------------------------------------------
@@indent@@// public usage
@@indent@@// ------------------------------------------------------------------------

@@indent@@@Override
@@indent@@public void initializePageBean(Map<String, String> fixParams, Map<String, IValueDelegation<?>> dynParams)
@@indent@@{
@@indent@@@@indent@@super.initializePageBean(fixParams,dynParams);
@@indent@@}

@@indent@@@Override
@@indent@@public void initializePageBeanConfigItems(List<PageBeanComponentAsControlConfigItem> configItems)
@@indent@@{
@@indent@@@@indent@@super.initializePageBeanConfigItems(configItems);
@@indent@@}

@@indent@@@Override
@@indent@@public void onBeforeRendering() {}

@@indent@@// ------------------------------------------------------------------------
@@indent@@// private usage
@@indent@@// ------------------------------------------------------------------------
}
