public void changeState(String stateName,String stateSecondaryName)
{
String fragmentName = getFragmentName(stateName);
ItsNatDocFragmentTemplate template = getFragmentTemplate(fragmentName);
if (template == null)
{
changeState("not_found");
return;
}
if (!itsNatDoc.isLoading())
{
ClientDocument clientDoc = itsNatDoc.getClientDocumentOwner();
String contentParentRef = clientDoc.getScriptUtil().getNodeReference(contentParentElem);
clientDoc.addCodeToSend("removeChildren(" + contentParentRef + ");"); // ".innerHTML = '';"
}
//ItsNatDOMUtil.removeAllChildren(contentParentElem);
// Setting new state:
changeActiveMenu(stateName);
DocumentFragment frag = template.loadDocumentFragment(itsNatDoc);
contentParentElem.appendChild(frag);
if (stateName.equals("overview")||stateName.equals("overview.showpopup"))
{
boolean popup = stateName.equals("overview.showpopup");