<%-- * Licensed Materials - Property of IBM * * 5724-U18 * * (C) COPYRIGHT IBM CORP. 2006,2016 All Rights Reserved. * * US Government Users Restricted Rights - Use, duplication or * disclosure restricted by GSA ADP Schedule Contract with * IBM Corp. --%><%-- This JSP is the handler for Quick Insert portlet component. It provides user interface for the portlet Events fired by this component are; - Open application in INSERT mode. --%> <%@ include file="../common/simpleheader.jsp" %><% String layoutId = component.getProperty("layoutid"); QuickInsertPortlet portletControl = (QuickInsertPortlet)control; PortletStateImpl portletStateManager = portletControl.getStateManager(); //intially when the portlet has not been loaded //if the portlet has not been loaded ever call this. //once its loaded we do not clear the flag if(portletStateManager.isPortletNotLoaded(component)) { %><%@ include file="portletloader.jsp" %><% } else { synchronized (portletControl.getAppBean().getPortletLoadingSync()) { boolean stateChanged = portletStateManager.isPortletStateChanged(); //if just porlet was minimised then don't re render as there is no need to redraw //but this flag had to be turned on when these events were fired so that jsp could be hit if(stateChanged) portletControl.setChangedFlag(false); if(portletStateManager.wasPortletLoadCalled()) { holderId="portletbody_"+layoutId; %> <%=" <% ArrayList allActions = portletControl.getRenderData(); if(portletControl.hasData()) { String portletControlId = portletControl.getId(); if(allActions!=null) { StringBuffer sb = new StringBuffer(); StringBuffer imgSb = new StringBuffer(); for(int i = 0; i < allActions.size(); i++) { sb.setLength(0); imgSb.setLength(0); Hashtable appInfo = (Hashtable)allActions.get(i); String appId = appInfo.get("app").toString(); String customDesc = appInfo.get("desc").toString(); String actionId = appInfo.get("optionname").toString(); String actionDesc = appInfo.get("optiondesc").toString(); String templateId = appInfo.get("templateid").toString(); //String appImage = "action_"+actionId.toLowerCase()+"_"+appId.toLowerCase()+".gif";//StringBuffer String altString = "alt=\"\""; imgSb.append("action_").append(actionId.toLowerCase()).append("_").append(appId.toLowerCase()).append(".gif"); sb.append(appId).append("$").append(actionId).append("$").append(templateId); if(customDesc.equals("")) customDesc = actionDesc; %> <% } } } else { if(portletControl.areAllActionsRestricted()) { %> <% } else { %> <%@ include file="portletnotsetupmsg.jsp" %> <% } } %> <%="]]>"%> <% //mark the portlet state loaded portletStateManager.setStateLoaded(); } else { // /If the portlet state is changed then fire the javascript to toggle its state if(portletStateManager.isPortletStateChanged()) { portletStateManager.setPortletStateChanged(false); %> ><%=" <%="]]>"%> <% } } } } %><%@ include file="../common/componentfooter.jsp" %>