<%-- * Licensed Materials - Property of IBM * * 5724-U18 * * (C) COPYRIGHT IBM CORP. 2012,2014 All Rights Reserved. * * US Government Users Restricted Rights - Use, duplication or * disclosure restricted by GSA ADP Schedule Contract with * IBM Corp. --%><%@page import="com.ibm.tivoli.maximo.skd.applet.SKDViewerApplet"%> <%@page import="psdi.webclient.system.runtime.WebClientRuntime"%> <%@page import="java.io.StringWriter"%> <%@page import="java.io.PrintWriter"%> <%@page import="psdi.server.*"%> <%@page contentType="text/html;charset=UTF-8" autoFlush="true" %><%@page import="com.ibm.tivoli.maximo.skd.control.*" %><%@page import="java.net.URLEncoder" %><% // Dynamic Variables for control aand JavaScript // set from the parent control jsp file, there are listed here for reference only // String ILOG_VIEWER_APPLET_NAME = "ASNViewer"; // String ILOG_VIEWER_APPLET_CLASS = "com.ibm.tivoli.maximo.skd.applet.ASNViewerApplet"; // String ILOG_VIEWER_APPLET_TITLE = "Graphical Assignment Manager"; // String ILOG_VIEWER_APPLET_DIV = "ilogviewerAppletDiv"; // String ILOG_VIEWER_APPLET_ID = "ilogViewerId" // String ILOG_VIEWER_APP_COMPONENT_ID = "asnviewerId"; // String ILOG_VIEWER_LOADING_ID = "ilogviewer_loading"; // String ILOG_VIEWER_TABLE = "ilogviewertable"; // depending on Java Versions, etc, sometimes we need to change the packEnabled flag. // Currenly Qiuping/Misha have determined that it should be false String ILOG_VIEWER_APPLET_PACK = "false"; // Serialize cookies so that we can pass it to the Applet String cookieData = SKDViewerUtil.serializeCookies(request); BaseViewerControl ilogViewerControl = (BaseViewerControl) control; // Serialize user properties String userProps = SKDViewerUtil.serializeViewerProperties(wcs.getMXSession()); id = component.getId(); app.put(ILOG_VIEWER_APP_COMPONENT_ID, ilogViewerControl.getId()); String extensionJars = ""; try { extensionJars = MXServer.getMXServer().getProperty("mxe.skd.extensionjars"); if ((extensionJars != null) && (extensionJars.trim().length() > 0)) { extensionJars = ", " + extensionJars; } // make sure extensionJars is never null if (extensionJars==null) extensionJars=""; } catch (Throwable t) { t.printStackTrace(); } // --- BUILD Applet Injection StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); pw.println(""); pw.println(""); pw.println(""); pw.println(""); pw.println(""); pw.println(""); pw.println(""); pw.println(""); pw.println(""); pw.println(""); pw.println(""); pw.println(""); pw.println(""); pw.println(""); pw.println(""); pw.println(""); pw.println(""); pw.println(""); pw.println(""+ILOG_VIEWER_APPLET_TITLE+" failed to load! -- Please check browser security settings and get the Java Plugin No Java 2 Plugin, Standard Edition Support for applet"); pw.println(""); pw.flush(); String objectTag = sw.getBuffer().toString(); // --- Applet Injection if(component.needsRender()) { %> <%-- 110572 use relative position so that container doesn't overflow screen --%>
automationid="<%=realId%>_filler"<% } %> class="mdw" style="position:relative;display:none;">
<% } // Component needs render. else { // 139262: In the Gantt view of the GA app, the Save button is not available after you make a change to the work list if (!ilogViewerControl.toBeSaved()) { %> ><%="]]> <% } if(!designmode) { if ( ilogViewerControl.hasAppletEvent()) { // send the applet event to the applet %> ><%="]]> <% ilogViewerControl.clearAppletEvent(); } %> ><%="]]> <% }//designmode } //if component needs render if(!designmode) { String dataSource = ilogViewerControl.getProperty("datasrc"); //if filter applied //call method on applet via JS //reset apply filter flag if value is not "" if ( ilogViewerControl.isfilterapplied()) { String skdActivityQBE = wcs.getDataBean(dataSource).getString("SKDACTIVITYQBE"); if (skdActivityQBE != null && !skdActivityQBE.equals("")) { %> ><%="]]> <% } ilogViewerControl.setApplyFilter(false); } if (ilogViewerControl.wasConstraintEdited()) { String newConstraintValues = wcs.getDataBean(dataSource).getString("EDITCONSTRAINTVALUES"); if (newConstraintValues != null && !newConstraintValues.isEmpty()) { %> ><%="]]> <% } ilogViewerControl.setConstraintEdited(false); } // refresh applet data if (!ilogViewerControl.wasConstraintEdited() && !ilogViewerControl.isfilterapplied() && ((ilogViewerControl.hasChanged() && !component.needsRender()) || ilogViewerControl.needsRender()) && ilogViewerControl.getAppletVisible()) { DataBean skdAppBean = wcs.getDataBean(dataSource); MboValueData mvd = skdAppBean.getMboValueData("skdprojectid"); long projectid = 0; if(mvd != null) { projectid = mvd.getDataAsLong(); } String skdProjectId = Long.toString(projectid); String skdProjectsString=ilogViewerControl.replaceSingleQuotes(skdAppBean.getString("SCENARIOPROJECTSSTRING")); String skdServletBase = wcs.getMaximoRequestContextURL() + "/skd"; boolean projectChanged = false; if(!app.containsKey("projectid") || !app.get("projectid").equals(skdProjectId)) { app.put("projectid", skdProjectId); projectChanged = true; } if (ilogViewerControl.needToRefreshProjectData()) { projectChanged = true; } if(!control.needsRender() ) { %> ><%=" <% } %> <% if(!control.needsRender()) { %> ]]> <% } if(ilogViewerControl.needsRender() && app.get("applinked") != null) { app.remove("applinked"); } } }//design mode %>