document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. <%@ include file="/html/taglib/init.jsp" %>
  2.  
  3. <%
  4. String key = (String)request.getAttribute("liferay-ui:error:key");
  5. String message = (String)request.getAttribute("liferay-ui:error:message");
  6. boolean translateMessage = GetterUtil.getBoolean((String)request.getAttribute("liferay-ui:error:translateMessage"));
  7. String rowBreak = (String)request.getAttribute("liferay-ui:error:rowBreak");
  8.  
  9. portletDisplay= themeDisplay.getPortletDisplay();
  10. String strPortletId= portletDisplay.getId();
  11. %>
  12.  
  13. <c:choose>
  14.     <c:when test="<%= (key != null) && Validator.isNull(message) %>">
  15.         <c:if test="<%= SessionErrors.contains(portletRequest, key) %>">
  16.             </div>
  17.  
  18.             <%= rowBreak %>
  19.         </c:if>
  20.     </c:when>
  21.     <c:when test="<%= key == null %>">
  22.         <c:if test="<%= !SessionErrors.isEmpty(portletRequest) %>">
  23.             <% if ((strPortletId).equalsIgnoreCase("formvalidation_WAR_SampleSpringFormValidationportlet")) { %>
  24.                 <!--  Do nothing for Shashant custom portlet -->
  25.             <%}else{ %>
  26.             <div class="portlet-msg-error">
  27.                 <liferay-ui:message key="your-request-failed-to-complete" />
  28.             </div>
  29.             <%} %>
  30.            
  31.             <%= rowBreak %>
  32.         </c:if>
  33.     </c:when>
  34.     <c:otherwise>
  35.         <c:if test="<%= SessionErrors.contains(portletRequest, key) %>">
  36.             <div class="portlet-msg-error">
  37.  
  38.             <c:choose>
  39.                 <c:when test="<%= translateMessage %>">
  40.                     <%= LanguageUtil.get(pageContext, message) %>
  41.                 </c:when>
  42.                 <c:otherwise>
  43.                     <%= message %>
  44.                 </c:otherwise>
  45.             </c:choose>
  46.  
  47.             </div>
  48.  
  49.             <%= rowBreak %>
  50.         </c:if>
  51.     </c:otherwise>
  52. </c:choose>
');