%-- -----------------------Begin Taglib includes -------------------- --%>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib uri="/tags/collab" prefix="collab" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>
<%@ taglib uri="/tags/struts-tiles" prefix="tiles" %>
<%@ taglib uri="/tags/struts-html" prefix="html" %>
<%@ page import="com.plumtree.collaboration.webui.calendar.*,com.plumtree.collaboration.webui.constants.RequestConstants,com.plumtree.core.util.http.BrowserUtil,org.apache.struts.util.MessageResources,com.plumtree.collaboration.context.ICollaborationContext,com.plumtree.remote.portlet.*,com.bea.services.collaboration.*"%>
<%-- -------------------------End Taglib includes -------------------- --%>
<%
// ! -- custom code added for individual project display -- !
CalendarControl calendar = null;
// decide if we are using custom display
String prefParam = request.getParameter("projectIdPrefName");
boolean isCustom = (null != prefParam) && (prefParam.length() > 0);
if (isCustom) {
// custom display a single calendar
//get the edk
IPortletContext portletContext = PortletContextFactory.createPortletContext(request, response);
IPortletRequest portletRequest = portletContext.getRequest();
// first grab the project ID from the passed in preference name (where we will get project ID)
String projectId = portletRequest.getSettingValue(SettingType.Session, prefParam);
// create a wrapper request object for project ID
CollaborationRequestWrapper wrapper = new CollaborationRequestWrapper(request, projectId);
// spoof calendar creation - use type 0 so we control project ID
// note: type 0 uses the projID querystring parameter passed via URL -- the reason for the wrapper object
calendar = new CalendarControl(0,
(ICollaborationContext)request.getAttribute("collaborationContext"),
(MessageResources)request.getAttribute("org.apache.struts.action.MESSAGE"), wrapper);
// save the control
request.setAttribute(CalendarControl.REQUEST_ATTRIB_NAME, calendar);
} else {
// if there's a message, display it and quit
String message = (String)request.getAttribute(RequestConstants.MESSAGE);
if (message!=null) {
out.println("
"+message+"
");
return;
}
calendar = (CalendarControl) request.getAttribute(CalendarControl.REQUEST_ATTRIB_NAME);
}
calendar.genHTML(out,request);
%>