public static void INCLUDES()
{
ItsNatDocument itsNatDoc = null;
ItsNatComponentManager componentMgr = itsNatDoc.getItsNatComponentManager();
final ItsNatFreeInclude includeComp = (ItsNatFreeInclude)componentMgr.createItsNatComponentById("includeId","freeInclude",null);
final ItsNatHTMLInput buttonComp = (ItsNatHTMLInput)componentMgr.createItsNatComponentById("buttonId");
EventListener evtListener = new EventListener()
{
public void handleEvent(Event evt)
{
if (includeComp.isIncluded())
uninclude();
else
include();
}
public void include()
{
includeComp.includeFragment("feashow.fragmentExample",true);
buttonComp.getHTMLInputElement().setValue("Remove");
}
public void uninclude()
{
includeComp.removeFragment();
buttonComp.getHTMLInputElement().setValue("Include");
}
};
buttonComp.addEventListener("click",evtListener);
}