<%@ page extends="oneit.servlets.jsp.FormJSP" %>

<%@ include file="inc/dynamic_content_core_top.jsp"  %>
<%@ include file="/inc/stdimports50.jsp" %>
<%@ page import="performa.utils.*"%>

<%
    ORMProcessState     process         =   (ORMProcessState)(ProcessDecorator.getDefaultProcess(request));
    ObjectTransaction   objTran         =   (process == null ? ObjectTransaction.getTransaction () : process.getTransaction ());
    String              portalName      =   WebUtils.getPortalName(objTran, article);
    SecUser             loggedInUser    =   SecUser.getTXUser(objTran);
    SecUser             clientUser      =   Utils.checkAdminPortalAccess(loggedInUser) ? loggedInUser : null;
    SecUser             applicantUser   =   Utils.checkApplicantPortalAccess(loggedInUser) ? loggedInUser : null;
    String              renderMode      =   CMSArticleTagDecorator.getRenderMode (request, "Page");
%>

<%@ include file="setuprequest.jsp" %>

<%
    if(CollectionUtils.equals(portalName, WebUtils.ADMIN_PORTAL))
    {
%>
        <%@ include file="extensions/adminportal/inc/htmlheader.jsp" %>
        <%@ include file="extensions/adminportal/inc/menuinclude.jsp" %>
<%
    }
    else if(CollectionUtils.equals(portalName, WebUtils.APPLICANT_PORTAL))
    {
%>
        <%@ include file="extensions/applicantportal/inc/htmlheader.jsp" %>
        <%@ include file="extensions/applicantportal/inc/menuinclude.jsp" %>
<%
    }


    Map m = CollectionUtils.mapEntry(NavigationBarDF.NAV_BAR, navbar.getChildNavBarFor (article))
                        .mapEntry("StartLevel", new Integer (0))
                        .mapEntry("EndLevel", new Integer (0))
                        .mapEntry("RenderMode", renderMode)
                        .toMap();
%>
    <oneit:dynInclude page="descendPageContent.jsp" data="<%= m %>"/> 
<%
    if(CollectionUtils.equals(portalName, WebUtils.ADMIN_PORTAL))
    {
        %><%@ include file="extensions/adminportal/inc/htmlfooter.jsp" %><%
    }
    else if(CollectionUtils.equals(portalName, WebUtils.APPLICANT_PORTAL))
    {
        %><%@ include file="extensions/applicantportal/inc/htmlfooter.jsp" %><%
    }
%>