ilwwcm-localrende.war error.jsp
<%-- Licensed Materials - Property of IBM --%> <%-- 5724-E76, 5655-R17, 5655-M44 --%> <%-- Copyright IBM Corp. 2009 All Rights reserved. --%> <%@ page session="false"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%> <%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet"%> <%@ taglib uri="/WEB-INF/tld/ibm-portlet-ext-v61.tld" prefix="portletext"%> <%@ taglib uri="http://www.ibm.com/xmlns/prod/websphere/portal/v8.0/resolver" prefix="resolver"%> <%@ taglib uri="/WEB-INF/tld/encoder.tld" prefix="enc"%> <%@ page import="javax.portlet.*"%> <%@ page import="com.ibm.portal.portletui.messages.StatusMessageBean"%> <%@ page import="com.ibm.workplace.wcm.app.ui.portlet.standard.RenderingPortletConstants"%> <%@ page import="com.ibm.workplace.wcm.app.ui.portlet.standard.model.*"%> <%-- Define javax.portlet.* objects --%> <portlet:defineObjects /> <% final PortletRequest portletRequest = renderRequest != null ? renderRequest : resourceRequest; %> <% final MimeResponse mimeResponse = renderResponse != null ? renderResponse : resourceResponse; %> <% if (com.ibm.workplace.wcm.app.ui.portlet.standard.model.ModelUtils.isCAMMicroformatRequired(portletRequest, mimeResponse)) { %> <span style="display:none" id="<portlet:namespace/>contentRenderingMenu" class="contextMenu"> <span class="menuId">contentRenderingMenu</span> <span class="params"> <span class="templateId">componentActionMenuTemplate</span> </span> </span> <% } %> <%-- Include script for configuration and edit mode --%> <script type="text/javascript" src="<c:out value="${null}"><%=mimeResponse.encodeURL(portletRequest.getContextPath()+"/js/error.js")%></c:out>"></script> <portletext:setBundle /> <%-- Use errorbean from request and assign message to variable msg --%> <jsp:useBean id="errorbean" scope="request" type="com.ibm.portal.portletui.messages.StatusMessageBean" /> <% String msg = errorbean.getMessage(); %> <%-- Create bar bean for pagescope --%> <jsp:useBean id="bar" scope="page" type="com.ibm.portal.portletui.messages.StatusBarBean" class="com.ibm.portal.portletui.messages.StatusBarBeanImpl"> </jsp:useBean> <% // Get the large icon for the type of the current message final char messageType = errorbean.getMessageType(); final String icon; if (messageType == StatusMessageBean.ERROR) { icon = mimeResponse.encodeURL(portletRequest.getContextPath()+"/images/iconErrorLarge.gif"); } else if (messageType == StatusMessageBean.WARNING) { icon = mimeResponse.encodeURL(portletRequest.getContextPath()+"/images/iconWarningLarge.gif");; } else if (messageType == StatusMessageBean.INFO) { icon = mimeResponse.encodeURL(portletRequest.getContextPath()+"/images/iconInfoLarge.png"); } else { icon = ""; } // Check whether a link to clear the context should be shown along with the message boolean showClearContextLink = false; final String[] messageFacets = errorbean.getFacets(); if (messageFacets != null && messageFacets.length > 0) { for (String messageFacet : messageFacets) { if (RenderingPortletConstants.MSG_FACET_CLEAR_CONTEXT.equalsIgnoreCase(messageFacet)) { showClearContextLink = true; break; } } } // Init status bar bar.setMessageBean(errorbean); %> <%-- Style sheet used for creating a Error.jsp with OneUI design --%> <c:set var='isBidiStyle' scope='request'><portletext:bidi dir="rtl">RTL</portletext:bidi></c:set> <link rel="stylesheet" type="text/css" href="<c:out value="${null}"><%=mimeResponse.encodeURL(portletRequest.getContextPath()+"/styles/error.css")%></c:out>" /> <script type="text/javascript"> <portlet:namespace/>myFormErrorHdl = new FormErrorHdl('<portlet:namespace/>', ''); </script> <c:choose> <c:when test="<%=messageType == StatusMessageBean.ERROR%>"> <fmt:message key="ERROR_0" var="altText" /> </c:when> <c:when test="<%=messageType == StatusMessageBean.WARNING%>"> <fmt:message key="WARNING_0" var="altText" /> </c:when> <c:otherwise> <fmt:message key="INFO_0" var="altText" /> </c:otherwise> </c:choose> <div class="lrpError <portletext:bidi dir="rtl">lrpErrorRtl</portletext:bidi><portletext:bidi dir="ltr"> lrpErrorLtr </portletext:bidi>"> <div class="lrpErrorBox" style="width: auto;"> <div class="lrpErrorContent" style="overflow: auto;"> <img class="lrpIcon" src="<c:out value="${null}"><%=icon%></c:out>" alt="<c:out value='${altText}'/>" title="<c:out value='${altText}'/>" /> <div class="lrpErrorForm"> <h1 class="lrpHeading"> <c:out value="${altText}" /> </h1> <p> <c:choose> <c:when test="<%=messageType == StatusMessageBean.ERROR%>"> <c:out value="${null}"> <fmt:message key="STANDARD_ERRORTXT_0" /> </c:out> </c:when> <c:otherwise> <c:out value="${null}">${errorbean.message}</c:out> <c:choose> <c:when test="<%=showClearContextLink%>"> <div class="lrpBtnContainer"> <span> <a class="lrpAction" href="<portlet:actionURL> <portlet:param name='<%=ActionRequest.ACTION_NAME%>' value='<%=RenderingPortletConstants.ACTION_NAME_CLEAR_CONTEXT%>'/> </portlet:actionURL>"> <c:out value="${null}"><fmt:message key="CLEAR_PAGE_CONTEXT_BTN_LABEL"/></c:out> </a> </span> </div> </c:when> </c:choose> </c:otherwise> </c:choose> </p> <form method="" action=""> <div class="lrpBtnContainer"> <span> <c:choose> <c:when test="<%=messageType == StatusMessageBean.ERROR%>"> <a class="lrpAction" href="javascript:void(0);" onclick="<portlet:namespace/>myFormErrorHdl.viewDetailedMessage('<enc:encodejs><%=errorbean.getMessage()%></enc:encodejs>','<enc:encodejs><%=bar.getTextStyle()%></enc:encodejs>','<enc:encodejs><%=mimeResponse.encodeURL(portletRequest.getContextPath()+"/images/"+bar.getImageURL())%></enc:encodejs>','<enc:encodejs><fmt:message key="ERROR_0"/></enc:encodejs>', 'lrpError <portletext:bidi dir="rtl">lrpErrorRtl</portletext:bidi><portletext:bidi dir="ltr">lrpErrorLtr</portletext:bidi>');return false;"> <c:out value="${null}"> <fmt:message key="FULL_ERROR_LINK_0" /> </c:out> </a> </c:when> <c:otherwise> </c:otherwise> </c:choose> </span> </div> </form> </div> <%-- End errorForm --%> </div> <%-- End errorContent --%> </div> <%-- end errorBox --%> </div>