List of usage examples for com.liferay.portal.kernel.security.permission ActionKeys UPDATE
String UPDATE
To view the source code for com.liferay.portal.kernel.security.permission ActionKeys UPDATE.
Click Source Link
From source file:org.apache.jsp.html.portal.javascript_005fcached_jsp.java
License:Open Source License
public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException { JspFactory _jspxFactory = null;// ww w .j a va2 s.com PageContext pageContext = null; HttpSession session = null; ServletContext application = null; ServletConfig config = null; JspWriter out = null; Object page = this; JspWriter _jspx_out = null; PageContext _jspx_page_context = null; try { _jspxFactory = JspFactory.getDefaultFactory(); response.setContentType("text/html; charset=UTF-8"); pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true); _jspx_page_context = pageContext; application = pageContext.getServletContext(); config = pageContext.getServletConfig(); session = pageContext.getSession(); out = pageContext.getOut(); _jspx_out = out; /** * Copyright (c) 2000-2007 Liferay, Inc. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ out.write('\n'); out.write('\n'); /** * Copyright (c) 2000-2007 Liferay, Inc. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ out.write('\n'); out.write('\n'); /** * Copyright (c) 2000-2007 Liferay, Inc. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); // liferay-theme:defineObjects com.liferay.taglib.theme.DefineObjectsTag _jspx_th_liferay_002dtheme_005fdefineObjects_005f0 = (com.liferay.taglib.theme.DefineObjectsTag) _005fjspx_005ftagPool_005fliferay_002dtheme_005fdefineObjects_005fnobody .get(com.liferay.taglib.theme.DefineObjectsTag.class); _jspx_th_liferay_002dtheme_005fdefineObjects_005f0.setPageContext(_jspx_page_context); _jspx_th_liferay_002dtheme_005fdefineObjects_005f0.setParent(null); int _jspx_eval_liferay_002dtheme_005fdefineObjects_005f0 = _jspx_th_liferay_002dtheme_005fdefineObjects_005f0 .doStartTag(); if (_jspx_th_liferay_002dtheme_005fdefineObjects_005f0 .doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) { _005fjspx_005ftagPool_005fliferay_002dtheme_005fdefineObjects_005fnobody .reuse(_jspx_th_liferay_002dtheme_005fdefineObjects_005f0); return; } _005fjspx_005ftagPool_005fliferay_002dtheme_005fdefineObjects_005fnobody .reuse(_jspx_th_liferay_002dtheme_005fdefineObjects_005f0); com.liferay.portal.theme.ThemeDisplay themeDisplay = null; com.liferay.portal.model.Company company = null; com.liferay.portal.model.Account account = null; com.liferay.portal.model.User user = null; com.liferay.portal.model.User realUser = null; com.liferay.portal.model.Contact contact = null; com.liferay.portal.model.Layout layout = null; java.util.List layouts = null; java.lang.Long plid = null; com.liferay.portal.model.LayoutTypePortlet layoutTypePortlet = null; java.lang.Long portletGroupId = null; com.liferay.portal.kernel.security.permission.PermissionChecker permissionChecker = null; java.util.Locale locale = null; java.util.TimeZone timeZone = null; com.liferay.portal.model.Theme theme = null; com.liferay.portal.model.ColorScheme colorScheme = null; com.liferay.portal.theme.PortletDisplay portletDisplay = null; themeDisplay = (com.liferay.portal.theme.ThemeDisplay) _jspx_page_context.findAttribute("themeDisplay"); company = (com.liferay.portal.model.Company) _jspx_page_context.findAttribute("company"); account = (com.liferay.portal.model.Account) _jspx_page_context.findAttribute("account"); user = (com.liferay.portal.model.User) _jspx_page_context.findAttribute("user"); realUser = (com.liferay.portal.model.User) _jspx_page_context.findAttribute("realUser"); contact = (com.liferay.portal.model.Contact) _jspx_page_context.findAttribute("contact"); layout = (com.liferay.portal.model.Layout) _jspx_page_context.findAttribute("layout"); layouts = (java.util.List) _jspx_page_context.findAttribute("layouts"); plid = (java.lang.Long) _jspx_page_context.findAttribute("plid"); layoutTypePortlet = (com.liferay.portal.model.LayoutTypePortlet) _jspx_page_context .findAttribute("layoutTypePortlet"); portletGroupId = (java.lang.Long) _jspx_page_context.findAttribute("portletGroupId"); permissionChecker = (com.liferay.portal.kernel.security.permission.PermissionChecker) _jspx_page_context .findAttribute("permissionChecker"); locale = (java.util.Locale) _jspx_page_context.findAttribute("locale"); timeZone = (java.util.TimeZone) _jspx_page_context.findAttribute("timeZone"); theme = (com.liferay.portal.model.Theme) _jspx_page_context.findAttribute("theme"); colorScheme = (com.liferay.portal.model.ColorScheme) _jspx_page_context.findAttribute("colorScheme"); portletDisplay = (com.liferay.portal.theme.PortletDisplay) _jspx_page_context .findAttribute("portletDisplay"); out.write("\r\n"); out.write("\r\n"); /** * Copyright (c) 2000-2006 Liferay, LLC. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); //@ page import="com.liferay.portal.kernel.util.PortletExtKeys" out.write("\r\n"); out.write("\r\n"); String contextPath = PropsUtil.get(PropsUtil.PORTAL_CTX); if (contextPath.equals("/")) { contextPath = ""; } out.write('\r'); out.write('\n'); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write('\n'); out.write('\n'); response.setContentType(ContentTypes.TEXT_JAVASCRIPT); out.write("\n"); out.write("\n"); out.write("function submitFormAlert(countdown) {\n"); out.write("\tvar msg = \""); out.print(UnicodeLanguageUtil.get(pageContext, "this-form-has-already-been-submitted")); out.write("\";\n"); out.write("\n"); out.write("\talert(msg.replace(\"{0}\", countdown));\n"); out.write("}\n"); out.write("\n"); String[] calendarDays = CalendarUtil.getDays(locale, "EEEE"); out.write("\n"); out.write("\n"); out.write("Calendar._DN = new Array(\n"); out.write("\t\""); out.print(calendarDays[0]); out.write("\",\n"); out.write("\t\""); out.print(calendarDays[1]); out.write("\",\n"); out.write("\t\""); out.print(calendarDays[2]); out.write("\",\n"); out.write("\t\""); out.print(calendarDays[3]); out.write("\",\n"); out.write("\t\""); out.print(calendarDays[4]); out.write("\",\n"); out.write("\t\""); out.print(calendarDays[5]); out.write("\",\n"); out.write("\t\""); out.print(calendarDays[6]); out.write("\",\n"); out.write("\t\""); out.print(calendarDays[0]); out.write("\"\n"); out.write(");\n"); out.write("\n"); calendarDays = CalendarUtil.getDays(locale, "EEE"); out.write("\n"); out.write("\n"); out.write("Calendar._SDN = new Array(\n"); out.write("\t\""); out.print(calendarDays[0]); out.write("\",\n"); out.write("\t\""); out.print(calendarDays[1]); out.write("\",\n"); out.write("\t\""); out.print(calendarDays[2]); out.write("\",\n"); out.write("\t\""); out.print(calendarDays[3]); out.write("\",\n"); out.write("\t\""); out.print(calendarDays[4]); out.write("\",\n"); out.write("\t\""); out.print(calendarDays[5]); out.write("\",\n"); out.write("\t\""); out.print(calendarDays[6]); out.write("\",\n"); out.write("\t\""); out.print(calendarDays[0]); out.write("\"\n"); out.write(");\n"); out.write("\n"); String[] calendarMonths = CalendarUtil.getMonths(locale); out.write("\n"); out.write("\n"); out.write("Calendar._MN = new Array(\n"); out.write("\t\""); out.print(calendarMonths[0]); out.write("\",\n"); out.write("\t\""); out.print(calendarMonths[1]); out.write("\",\n"); out.write("\t\""); out.print(calendarMonths[2]); out.write("\",\n"); out.write("\t\""); out.print(calendarMonths[3]); out.write("\",\n"); out.write("\t\""); out.print(calendarMonths[4]); out.write("\",\n"); out.write("\t\""); out.print(calendarMonths[5]); out.write("\",\n"); out.write("\t\""); out.print(calendarMonths[6]); out.write("\",\n"); out.write("\t\""); out.print(calendarMonths[7]); out.write("\",\n"); out.write("\t\""); out.print(calendarMonths[8]); out.write("\",\n"); out.write("\t\""); out.print(calendarMonths[9]); out.write("\",\n"); out.write("\t\""); out.print(calendarMonths[10]); out.write("\",\n"); out.write("\t\""); out.print(calendarMonths[11]); out.write("\"\n"); out.write(");\n"); out.write("\n"); calendarMonths = CalendarUtil.getMonths(locale, "MMM"); out.write("\n"); out.write("\n"); out.write("Calendar._SMN = new Array(\n"); out.write("\t\""); out.print(calendarMonths[0]); out.write("\",\n"); out.write("\t\""); out.print(calendarMonths[1]); out.write("\",\n"); out.write("\t\""); out.print(calendarMonths[2]); out.write("\",\n"); out.write("\t\""); out.print(calendarMonths[3]); out.write("\",\n"); out.write("\t\""); out.print(calendarMonths[4]); out.write("\",\n"); out.write("\t\""); out.print(calendarMonths[5]); out.write("\",\n"); out.write("\t\""); out.print(calendarMonths[6]); out.write("\",\n"); out.write("\t\""); out.print(calendarMonths[7]); out.write("\",\n"); out.write("\t\""); out.print(calendarMonths[8]); out.write("\",\n"); out.write("\t\""); out.print(calendarMonths[9]); out.write("\",\n"); out.write("\t\""); out.print(calendarMonths[10]); out.write("\",\n"); out.write("\t\""); out.print(calendarMonths[11]); out.write("\"\n"); out.write(");\n"); out.write("\n"); out.write("Calendar._TT = {};\n"); out.write("\n"); out.write("Calendar._TT[\"ABOUT\"] = \""); if (_jspx_meth_liferay_002dui_005fmessage_005f0(_jspx_page_context)) return; out.write("\";\n"); out.write( "Calendar._TT[\"ABOUT\"] = Calendar._TT[\"ABOUT\"].replace(\"{0}\", String.fromCharCode(0x2039));\n"); out.write( "Calendar._TT[\"ABOUT\"] = Calendar._TT[\"ABOUT\"].replace(\"{1}\", String.fromCharCode(0x203a));\n"); out.write("\n"); out.write("Calendar._TT[\"ABOUT_TIME\"] = \"\";\n"); out.write("Calendar._TT[\"CLOSE\"] = \""); if (_jspx_meth_liferay_002dui_005fmessage_005f1(_jspx_page_context)) return; out.write("\";\n"); out.write("Calendar._TT[\"DAY_FIRST\"] = \"Display %s First\";\n"); out.write("Calendar._TT[\"DRAG_TO_MOVE\"] = \"\";\n"); out.write("Calendar._TT[\"GO_TODAY\"] = \""); if (_jspx_meth_liferay_002dui_005fmessage_005f2(_jspx_page_context)) return; out.write("\";\n"); out.write("Calendar._TT[\"INFO\"] = \""); if (_jspx_meth_liferay_002dui_005fmessage_005f3(_jspx_page_context)) return; out.write("\";\n"); out.write("Calendar._TT[\"NEXT_MONTH\"] = \""); if (_jspx_meth_liferay_002dui_005fmessage_005f4(_jspx_page_context)) return; out.write("\";\n"); out.write("Calendar._TT[\"NEXT_YEAR\"] = \""); if (_jspx_meth_liferay_002dui_005fmessage_005f5(_jspx_page_context)) return; out.write("\";\n"); out.write("Calendar._TT[\"PART_TODAY\"] = \"\";\n"); out.write("Calendar._TT[\"PREV_MONTH\"] = \""); if (_jspx_meth_liferay_002dui_005fmessage_005f6(_jspx_page_context)) return; out.write("\";\n"); out.write("Calendar._TT[\"PREV_YEAR\"] = \""); if (_jspx_meth_liferay_002dui_005fmessage_005f7(_jspx_page_context)) return; out.write("\";\n"); out.write("Calendar._TT[\"SEL_DATE\"] = \""); if (_jspx_meth_liferay_002dui_005fmessage_005f8(_jspx_page_context)) return; out.write("\";\n"); out.write("Calendar._TT[\"SUN_FIRST\"] = \"\";\n"); out.write("Calendar._TT[\"TIME_PART\"] = \"\";\n"); out.write("Calendar._TT[\"TODAY\"] = \""); if (_jspx_meth_liferay_002dui_005fmessage_005f9(_jspx_page_context)) return; out.write("\";\n"); out.write("Calendar._TT[\"WK\"] = \"\";\n"); out.write("\n"); out.write("Calendar._TT[\"DEF_DATE_FORMAT\"] = \"%Y-%m-%d\";\n"); out.write("Calendar._TT[\"TT_DATE_FORMAT\"] = \"%a, %b %e\";\n"); out.write("\n"); out.write("Calendar._TT[\"WEEKEND\"] = \"0,6\";\n"); out.write("\n"); /** * Copyright (c) 2000-2007 Liferay, Inc. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ out.write("\n"); out.write("\n"); out.write("var loadingAnimation = new Image();\n"); out.write("\n"); out.write("loadingAnimation.src = \""); out.print(themeDisplay.getPathThemeImages()); out.write("/progress_bar/loading_animation.gif\";\n"); out.write("\n"); out.write("function addPortletHTML(url, placeHolder) {\n"); out.write("\tvar addPortletReturn = function(html) {\n"); out.write("\t\tvar container = placeHolder.parentNode;\n"); out.write("\t\tvar addDiv = document.createElement(\"div\");\n"); out.write("\n"); out.write("\t\taddDiv.style.display = \"none\";\n"); out.write("\t\taddDiv.innerHTML = html;\n"); out.write("\n"); out.write("\t\tvar portletBound = _$J(\".portlet-boundary:first\", addDiv).get(0);\n"); out.write("\n"); out.write("\t\tportletBound.parentNode.removeChild(portletBound);\n"); out.write("\n"); out.write("\t\tvar portletId = portletBound.id;\n"); out.write("\n"); out.write("\t\tportletId = portletId.replace(/^p_p_id_/,\"\");\n"); out.write("\t\tportletId = portletId.replace(/_$/,\"\");\n"); out.write("\n"); out.write("\t\tportletBound.portletId = portletId;\n"); out.write("\n"); out.write("\t\tLiferay.Portlet.flagAjax(portletId);\n"); out.write("\n"); out.write("\t\tcontainer.replaceChild(portletBound, placeHolder);\n"); out.write("\n"); out.write("\t\tjQuery(addDiv).evalScripts();\n"); out.write("\n"); out.write("\t\tif (!jQuery.browser.firefox) {\n"); out.write("\t\t\tjQuery(portletBound).evalScripts();\n"); out.write("\t\t}\n"); out.write("\n"); out.write("\t\t"); // c:if org.apache.taglibs.standard.tag.rt.core.IfTag _jspx_th_c_005fif_005f0 = (org.apache.taglibs.standard.tag.rt.core.IfTag) _005fjspx_005ftagPool_005fc_005fif_005ftest .get(org.apache.taglibs.standard.tag.rt.core.IfTag.class); _jspx_th_c_005fif_005f0.setPageContext(_jspx_page_context); _jspx_th_c_005fif_005f0.setParent(null); _jspx_th_c_005fif_005f0.setTest((layout != null) && (LayoutPermissionUtil.contains(permissionChecker, layout, ActionKeys.UPDATE))); int _jspx_eval_c_005fif_005f0 = _jspx_th_c_005fif_005f0.doStartTag(); if (_jspx_eval_c_005fif_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) { do { out.write("\n"); out.write("\t\t\tif (!portletBound.isStatic) {\n"); out.write("\t\t\t\tif (themeDisplay.isFreeformLayout()) {\n"); out.write("\t\t\t\t\tLiferay.Freeform.add(portletBound);\n"); out.write("\t\t\t\t}\n"); out.write("\t\t\t\telse {\n"); out.write("\t\t\t\t\tLiferay.Columns.add(portletBound);\n"); out.write("\t\t\t\t}\n"); out.write("\t\t\t}\n"); out.write("\t\t"); int evalDoAfterBody = _jspx_th_c_005fif_005f0.doAfterBody(); if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN) break; } while (true); } if (_jspx_th_c_005fif_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) { _005fjspx_005ftagPool_005fc_005fif_005ftest.reuse(_jspx_th_c_005fif_005f0); return; } _005fjspx_005ftagPool_005fc_005fif_005ftest.reuse(_jspx_th_c_005fif_005f0); out.write("\n"); out.write("\n"); out.write("\t\tif (_$J.browser.firefox) {\n"); out.write("\t\t\tsetTimeout(\"Liferay.Portlet.process(\\\"\" + portletId + \"\\\")\", 0);\n"); out.write("\t\t}\n"); out.write("\t\telse {\n"); out.write("\t\t\tLiferay.Portlet.process(portletId);\n"); out.write("\t\t}\n"); out.write("\n"); out.write("\t\tLiferay.Util.addInputType(portletBound.id);\n"); out.write("\t\tLiferay.Util.addInputFocus(portletBound.id);\n"); out.write("\n"); out.write("\t\tif (window.location.hash) {\n"); out.write("\t\t\twindow.location.hash = \"p_\" + portletId;\n"); out.write("\t\t}\n"); out.write("\n"); out.write("\t\treturn portletId;\n"); out.write("\t};\n"); out.write("\n"); out.write("\tAjaxUtil.request(url, {\n"); out.write("\t\tonComplete: function(xmlHttpReq){\n"); out.write("\t\t\taddPortletReturn(xmlHttpReq.responseText);\n"); out.write("\t\t}\n"); out.write("\t});\n"); out.write("}\n"); out.write("\n"); out.write("function closePortlet(plid, portletId, doAsUserId, skipConfirm) {\n"); out.write("\tif (skipConfirm || confirm('"); out.print(UnicodeLanguageUtil.get(pageContext, "are-you-sure-you-want-to-remove-this-component")); out.write("')) {\n"); out.write("\t\tvar curItem = document.getElementById(\"p_p_id_\" + portletId + \"_\");\n"); out.write("\t\tvar parent = curItem.parentNode;\n"); out.write("\n"); out.write("\t\tparent.removeChild(curItem);\n"); out.write("\n"); out.write("\t\tif (curItem = document.getElementById(portletId)) {\n"); out.write("\t\t\tparent = curItem.parentNode;\n"); out.write("\n"); out.write("\t\t\tparent.removeChild(curItem);\n"); out.write("\t\t}\n"); out.write("\n"); out.write("\t\tif (LayoutConfiguration) {\n"); out.write("\t\t\tLayoutConfiguration.initialized = false;\n"); out.write("\t\t}\n"); out.write("\n"); out.write("\t\tif (themeDisplay.layoutMaximized) {\n"); out.write("\t\t\tself.location = \""); out.print(themeDisplay.getPathMain()); out.write( "/portal/update_layout?p_l_id=\" + plid + \"&p_p_id=\" + portletId + \"&doAsUserId=\" + doAsUserId + \"&"); out.print(Constants.CMD); out.write('='); out.print(Constants.DELETE); out.write("&referer=\" + encodeURIComponent(\""); out.print(themeDisplay.getPathMain()); out.write("/portal/layout?p_l_id=\" + plid + \"&doAsUserId=\" + doAsUserId) + \"&refresh=1\";\n"); out.write("\t\t}\n"); out.write("\t\telse {\n"); out.write("\t\t\tloadPage(\""); out.print(themeDisplay.getPathMain()); out.write( "/portal/update_layout\", \"p_l_id=\" + plid + \"&p_p_id=\" + portletId + \"&doAsUserId=\" + doAsUserId + \"&"); out.print(Constants.CMD); out.write('='); out.print(Constants.DELETE); out.write("\");\n"); out.write("\t\t}\n"); out.write("\n"); out.write("\t\tLiferay.Portlet.remove(portletId);\n"); out.write("\t}\n"); out.write("\telse {\n"); out.write("\t\tself.focus();\n"); out.write("\t}\n"); out.write("}\n"); out.write("\n"); out.write("function getRefreshPortletList() {\n"); out.write("\n"); out.write("\t"); List portlets = PortletLocalServiceUtil.getPortlets(company.getCompanyId(), false, false); List nonAjaxPortlets = new ArrayList(); for (int i = 0; i < portlets.size(); i++) { Portlet portlet = (Portlet) portlets.get(i); if (!portlet.isAjaxable()) { nonAjaxPortlets.add(portlet.getPortletId()); } } StringMaker portletList = new StringMaker(); for (int i = 0; i < nonAjaxPortlets.size(); i++) { portletList.append("_"); portletList.append(nonAjaxPortlets.get(i)); portletList.append(":true"); portletList.append((i < nonAjaxPortlets.size() - 1) ? "," : ""); } out.write("\n"); out.write("\n"); out.write("\tvar refreshPortletList = { "); out.print(portletList.toString()); out.write(" };\n"); out.write("\n"); out.write("\treturn refreshPortletList;\n"); out.write("}\n"); out.write("\n"); out.write("function minimizePortlet(plid, portletId, restore, doAsUserId) {\n"); out.write("\tif (themeDisplay.layoutMaximized) {\n"); out.write("\t\tself.location = \""); out.print(themeDisplay.getPathMain()); out.write( "/portal/update_layout?p_l_id=\" + plid + \"&p_p_id=\" + portletId + \"&p_p_restore=\" + restore + \"&doAsUserId=\" + doAsUserId + \"&"); out.print(Constants.CMD); out.write("=minimize&referer=\" + encodeURIComponent(\""); out.print(themeDisplay.getPathMain()); out.write("/portal/layout?p_l_id=\" + plid + \"&doAsUserId=\" + doAsUserId) + \"&refresh=1\";\n"); out.write("\t}\n"); out.write("\telse {\n"); out.write("\t\tvar portlet = jQuery('#p_p_id_' + portletId + '_');\n"); out.write("\t\tvar portletContentContainer = portlet.find('.portlet-content-container');\n"); out.write("\n"); out.write("\t\tvar buttonsEl = jQuery(\"#p_p_body_\" + portletId + \"_min_buttons\");\n"); out.write("\n"); out.write("\t\tvar html = buttonsEl.html();\n"); out.write("\n"); out.write("\t\tif (restore) {\n"); out.write("\t\t\tportletContentContainer.BlindDown('fast');\n"); out.write("\n"); out.write("\t\t\thtml = html.replace(\", true\", \", false\");\n"); out.write("\t\t\thtml = html.replace(\"restore.png\", \"minimize.png\");\n"); out.write("\t\t\thtml = html.replace(\""); if (_jspx_meth_liferay_002dui_005fmessage_005f10(_jspx_page_context)) return; out.write("\", \""); if (_jspx_meth_liferay_002dui_005fmessage_005f11(_jspx_page_context)) return; out.write("\");\n"); out.write("\n"); out.write("\t\t\tloadPage(\""); out.print(themeDisplay.getPathMain()); out.write( "/portal/update_layout\", \"p_l_id=\" + plid + \"&p_p_id=\" + portletId + \"&p_p_restore=\" + restore + \"&doAsUserId=\" + doAsUserId + \"&"); out.print(Constants.CMD); out.write("=minimize\");\n"); out.write("\t\t}\n"); out.write("\t\telse {\n"); out.write("\t\t\tportletContentContainer.BlindUp('fast');\n"); out.write("\n"); out.write("\t\t\thtml = html.replace(\", false\", \", true\");\n"); out.write("\t\t\thtml = html.replace(\"minimize.png\", \"restore.png\");\n"); out.write("\t\t\thtml = html.replace(\""); if (_jspx_meth_liferay_002dui_005fmessage_005f12(_jspx_page_context)) return; out.write("\", \""); if (_jspx_meth_liferay_002dui_005fmessage_005f13(_jspx_page_context)) return; out.write("\");\n"); out.write("\n"); out.write("\t\t\tloadPage(\""); out.print(themeDisplay.getPathMain()); out.write( "/portal/update_layout\", \"p_l_id=\" + plid + \"&p_p_id=\" + portletId + \"&p_p_restore=\" + restore + \"&doAsUserId=\" + doAsUserId + \"&"); out.print(Constants.CMD); out.write("=minimize\");\n"); out.write("\t\t}\n"); out.write("\n"); out.write("\t\tbuttonsEl.html(html);\n"); out.write("\t}\n"); out.write("}"); } catch (Throwable t) { if (!(t instanceof SkipPageException)) { out = _jspx_out; if (out != null && out.getBufferSize() != 0) out.clearBuffer(); if (_jspx_page_context != null) _jspx_page_context.handlePageException(t); } } finally { if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context); } }
From source file:org.apache.jsp.html.themes.brochure.templates.myplaces_jsp.java
License:Open Source License
public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException { JspFactory _jspxFactory = null;//from w w w. j av a 2s . c o m PageContext pageContext = null; HttpSession session = null; ServletContext application = null; ServletConfig config = null; JspWriter out = null; Object page = this; JspWriter _jspx_out = null; PageContext _jspx_page_context = null; try { _jspxFactory = JspFactory.getDefaultFactory(); response.setContentType("text/html; charset=UTF-8"); pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true); _jspx_page_context = pageContext; application = pageContext.getServletContext(); config = pageContext.getServletConfig(); session = pageContext.getSession(); out = pageContext.getOut(); _jspx_out = out; /** * Copyright (c) 2000-2007 Liferay, Inc. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ out.write('\n'); out.write('\n'); /** * Copyright (c) 2000-2007 Liferay, Inc. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ out.write('\n'); out.write('\n'); /** * Copyright (c) 2000-2007 Liferay, Inc. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); // liferay-theme:defineObjects com.liferay.taglib.theme.DefineObjectsTag _jspx_th_liferay_002dtheme_005fdefineObjects_005f0 = (com.liferay.taglib.theme.DefineObjectsTag) _005fjspx_005ftagPool_005fliferay_002dtheme_005fdefineObjects_005fnobody .get(com.liferay.taglib.theme.DefineObjectsTag.class); _jspx_th_liferay_002dtheme_005fdefineObjects_005f0.setPageContext(_jspx_page_context); _jspx_th_liferay_002dtheme_005fdefineObjects_005f0.setParent(null); int _jspx_eval_liferay_002dtheme_005fdefineObjects_005f0 = _jspx_th_liferay_002dtheme_005fdefineObjects_005f0 .doStartTag(); if (_jspx_th_liferay_002dtheme_005fdefineObjects_005f0 .doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) { _005fjspx_005ftagPool_005fliferay_002dtheme_005fdefineObjects_005fnobody .reuse(_jspx_th_liferay_002dtheme_005fdefineObjects_005f0); return; } _005fjspx_005ftagPool_005fliferay_002dtheme_005fdefineObjects_005fnobody .reuse(_jspx_th_liferay_002dtheme_005fdefineObjects_005f0); com.liferay.portal.theme.ThemeDisplay themeDisplay = null; com.liferay.portal.model.Company company = null; com.liferay.portal.model.Account account = null; com.liferay.portal.model.User user = null; com.liferay.portal.model.User realUser = null; com.liferay.portal.model.Contact contact = null; com.liferay.portal.model.Layout layout = null; java.util.List layouts = null; java.lang.Long plid = null; com.liferay.portal.model.LayoutTypePortlet layoutTypePortlet = null; java.lang.Long portletGroupId = null; com.liferay.portal.kernel.security.permission.PermissionChecker permissionChecker = null; java.util.Locale locale = null; java.util.TimeZone timeZone = null; com.liferay.portal.model.Theme theme = null; com.liferay.portal.model.ColorScheme colorScheme = null; com.liferay.portal.theme.PortletDisplay portletDisplay = null; themeDisplay = (com.liferay.portal.theme.ThemeDisplay) _jspx_page_context.findAttribute("themeDisplay"); company = (com.liferay.portal.model.Company) _jspx_page_context.findAttribute("company"); account = (com.liferay.portal.model.Account) _jspx_page_context.findAttribute("account"); user = (com.liferay.portal.model.User) _jspx_page_context.findAttribute("user"); realUser = (com.liferay.portal.model.User) _jspx_page_context.findAttribute("realUser"); contact = (com.liferay.portal.model.Contact) _jspx_page_context.findAttribute("contact"); layout = (com.liferay.portal.model.Layout) _jspx_page_context.findAttribute("layout"); layouts = (java.util.List) _jspx_page_context.findAttribute("layouts"); plid = (java.lang.Long) _jspx_page_context.findAttribute("plid"); layoutTypePortlet = (com.liferay.portal.model.LayoutTypePortlet) _jspx_page_context .findAttribute("layoutTypePortlet"); portletGroupId = (java.lang.Long) _jspx_page_context.findAttribute("portletGroupId"); permissionChecker = (com.liferay.portal.kernel.security.permission.PermissionChecker) _jspx_page_context .findAttribute("permissionChecker"); locale = (java.util.Locale) _jspx_page_context.findAttribute("locale"); timeZone = (java.util.TimeZone) _jspx_page_context.findAttribute("timeZone"); theme = (com.liferay.portal.model.Theme) _jspx_page_context.findAttribute("theme"); colorScheme = (com.liferay.portal.model.ColorScheme) _jspx_page_context.findAttribute("colorScheme"); portletDisplay = (com.liferay.portal.theme.PortletDisplay) _jspx_page_context .findAttribute("portletDisplay"); out.write("\r\n"); out.write("\r\n"); /** * Copyright (c) 2000-2006 Liferay, LLC. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); //@ page import="com.liferay.portal.kernel.util.PortletExtKeys" out.write("\r\n"); out.write("\r\n"); String contextPath = PropsUtil.get(PropsUtil.PORTAL_CTX); if (contextPath.equals("/")) { contextPath = ""; } out.write('\r'); out.write('\n'); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write('\n'); out.write('\n'); RenderRequest renderRequest = (RenderRequest) request.getAttribute(JavaConstants.JAVAX_PORTLET_REQUEST); RenderResponse renderResponse = (RenderResponse) request .getAttribute(JavaConstants.JAVAX_PORTLET_RESPONSE); String namespace = StringPool.BLANK; if (renderRequest != null) { namespace = renderResponse.getNamespace(); } String currentURL = PortalUtil.getCurrentURL(request); out.write('\n'); out.write('\n'); /** * Copyright (c) 2000-2007 Liferay, Inc. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\r\n"); out.write("\r\n"); // c:if org.apache.taglibs.standard.tag.rt.core.IfTag _jspx_th_c_005fif_005f0 = (org.apache.taglibs.standard.tag.rt.core.IfTag) _005fjspx_005ftagPool_005fc_005fif_005ftest .get(org.apache.taglibs.standard.tag.rt.core.IfTag.class); _jspx_th_c_005fif_005f0.setPageContext(_jspx_page_context); _jspx_th_c_005fif_005f0.setParent(null); _jspx_th_c_005fif_005f0.setTest(themeDisplay.isSignedIn()); int _jspx_eval_c_005fif_005f0 = _jspx_th_c_005fif_005f0.doStartTag(); if (_jspx_eval_c_005fif_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) { do { out.write("\r\n"); out.write("\r\n"); out.write("\t\t"); PortletURL portletURL = new PortletURLImpl(request, PortletKeys.MY_PLACES, plid.longValue(), true); portletURL.setWindowState(WindowState.NORMAL); portletURL.setPortletMode(PortletMode.VIEW); portletURL.setParameter("struts_action", "/my_places/view"); LinkedHashMap groupParams = new LinkedHashMap(); groupParams.put("usersGroups", new Long(user.getUserId())); //groupParams.put("pageCount", StringPool.BLANK); List communities = GroupLocalServiceUtil.search(company.getCompanyId(), null, null, groupParams, QueryUtil.ALL_POS, QueryUtil.ALL_POS); Group locationGroup = user.getLocation().getGroup(); if (locationGroup.getGroupId() > 0) { communities.add(0, locationGroup); } Group organizationGroup = user.getOrganization().getGroup(); if (organizationGroup.getGroupId() > 0) { communities.add(0, organizationGroup); } if (user.isLayoutsRequired()) { Group userGroup = user.getGroup(); communities.add(0, userGroup); } for (int i = 0; i < communities.size(); i++) { Group community = (Group) communities.get(i); boolean organizationCommunity = community.isOrganization(); boolean regularCommunity = community.isCommunity(); boolean userCommunity = community.isUser(); int publicLayoutsPageCount = community.getPublicLayoutsPageCount(); int privateLayoutsPageCount = community.getPrivateLayoutsPageCount(); Organization organization = null; String publicAddPageHREF = null; String privateAddPageHREF = null; if (organizationCommunity) { organization = OrganizationLocalServiceUtil.getOrganization(community.getClassPK()); if ((!organization.isLocation() && OrganizationPermissionUtil.contains( permissionChecker, organization.getOrganizationId(), ActionKeys.UPDATE)) || (organization.isLocation() && LocationPermissionUtil.contains(permissionChecker, organization.getOrganizationId(), ActionKeys.UPDATE))) { PortletURL addPageURL = new PortletURLImpl(request, PortletKeys.MY_PLACES, plid.longValue(), true); addPageURL.setWindowState(WindowState.NORMAL); addPageURL.setPortletMode(PortletMode.VIEW); addPageURL.setParameter("struts_action", "/my_places/edit_pages"); addPageURL.setParameter("groupId", String.valueOf(community.getGroupId())); addPageURL.setParameter("privateLayout", Boolean.FALSE.toString()); publicAddPageHREF = addPageURL.toString(); addPageURL.setParameter("privateLayout", Boolean.TRUE.toString()); privateAddPageHREF = addPageURL.toString(); } } else if (regularCommunity) { if (GroupPermissionUtil.contains(permissionChecker, community.getGroupId(), ActionKeys.MANAGE_LAYOUTS)) { PortletURL addPageURL = new PortletURLImpl(request, PortletKeys.MY_PLACES, plid.longValue(), true); addPageURL.setWindowState(WindowState.NORMAL); addPageURL.setPortletMode(PortletMode.VIEW); addPageURL.setParameter("struts_action", "/my_places/edit_pages"); addPageURL.setParameter("groupId", String.valueOf(community.getGroupId())); addPageURL.setParameter("privateLayout", Boolean.FALSE.toString()); publicAddPageHREF = addPageURL.toString(); addPageURL.setParameter("privateLayout", Boolean.TRUE.toString()); privateAddPageHREF = addPageURL.toString(); } } else if (userCommunity) { long publicAddPagePlid = community.getDefaultPublicPlid(); PortletURL publicAddPageURL = new PortletURLImpl(request, PortletKeys.LAYOUT_MANAGEMENT, publicAddPagePlid, false); publicAddPageURL.setWindowState(WindowState.MAXIMIZED); publicAddPageURL.setPortletMode(PortletMode.VIEW); publicAddPageURL.setParameter("struts_action", "/layout_management/edit_pages"); publicAddPageURL.setParameter("tabs2", "public"); publicAddPageURL.setParameter("groupId", String.valueOf(community.getGroupId())); publicAddPageHREF = publicAddPageURL.toString(); long privateAddPagePlid = community.getDefaultPrivatePlid(); PortletURL privateAddPageURL = new PortletURLImpl(request, PortletKeys.LAYOUT_MANAGEMENT, privateAddPagePlid, false); privateAddPageURL.setWindowState(WindowState.MAXIMIZED); privateAddPageURL.setPortletMode(PortletMode.VIEW); privateAddPageURL.setParameter("struts_action", "/layout_management/edit_pages"); privateAddPageURL.setParameter("tabs2", "private"); privateAddPageURL.setParameter("groupId", String.valueOf(community.getGroupId())); privateAddPageHREF = privateAddPageURL.toString(); } out.write("\r\n"); out.write("\r\n"); out.write("\t\t\t\t"); String title = ""; if (organizationCommunity) { title = organization.getName(); } else if (userCommunity) { title = LanguageUtil.get(pageContext, "my-community"); } else { title = community.getName(); } out.write("\r\n"); out.write("\r\n"); out.write("\t\t\t\t"); portletURL.setParameter("groupId", String.valueOf(community.getGroupId())); portletURL.setParameter("privateLayout", Boolean.FALSE.toString()); boolean selectedPlace = false; if (layout != null) { selectedPlace = !layout.isPrivateLayout() && (layout.getGroupId() == community.getGroupId()); } out.write("\r\n"); out.write("\r\n"); out.write("\t\t\t\t"); // c:if org.apache.taglibs.standard.tag.rt.core.IfTag _jspx_th_c_005fif_005f1 = (org.apache.taglibs.standard.tag.rt.core.IfTag) _005fjspx_005ftagPool_005fc_005fif_005ftest .get(org.apache.taglibs.standard.tag.rt.core.IfTag.class); _jspx_th_c_005fif_005f1.setPageContext(_jspx_page_context); _jspx_th_c_005fif_005f1.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_c_005fif_005f0); _jspx_th_c_005fif_005f1.setTest(publicLayoutsPageCount > 0); int _jspx_eval_c_005fif_005f1 = _jspx_th_c_005fif_005f1.doStartTag(); if (_jspx_eval_c_005fif_005f1 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) { do { out.write("\r\n"); out.write("\t\t\t\t<li class=\"public "); out.print(selectedPlace ? "current" : ""); out.write("\">\r\n"); out.write("\t\t\t\t\t<a href='"); out.print(publicLayoutsPageCount > 0 ? portletURL.toString() : "javascript: ;"); out.write('\''); out.write('>'); out.print(title); out.write("</a>\r\n"); out.write("\t\t\t\t</li>\r\n"); out.write("\t\t\t\t"); int evalDoAfterBody = _jspx_th_c_005fif_005f1.doAfterBody(); if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN) break; } while (true); } if (_jspx_th_c_005fif_005f1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) { _005fjspx_005ftagPool_005fc_005fif_005ftest.reuse(_jspx_th_c_005fif_005f1); return; } _005fjspx_005ftagPool_005fc_005fif_005ftest.reuse(_jspx_th_c_005fif_005f1); out.write("\r\n"); out.write("\r\n"); out.write("\t\t\t\t"); portletURL.setParameter("groupId", String.valueOf(community.getGroupId())); portletURL.setParameter("privateLayout", Boolean.TRUE.toString()); selectedPlace = false; if (layout != null) { selectedPlace = layout.isPrivateLayout() && (layout.getGroupId() == community.getGroupId()); } out.write("\r\n"); out.write("\r\n"); out.write("\t\t\t\t"); // c:if org.apache.taglibs.standard.tag.rt.core.IfTag _jspx_th_c_005fif_005f2 = (org.apache.taglibs.standard.tag.rt.core.IfTag) _005fjspx_005ftagPool_005fc_005fif_005ftest .get(org.apache.taglibs.standard.tag.rt.core.IfTag.class); _jspx_th_c_005fif_005f2.setPageContext(_jspx_page_context); _jspx_th_c_005fif_005f2.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_c_005fif_005f0); _jspx_th_c_005fif_005f2.setTest(privateLayoutsPageCount > 0); int _jspx_eval_c_005fif_005f2 = _jspx_th_c_005fif_005f2.doStartTag(); if (_jspx_eval_c_005fif_005f2 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) { do { out.write("\r\n"); out.write("\t\t\t\t<li class=\"private "); out.print(selectedPlace ? "current" : ""); out.write("\">\r\n"); out.write("\t\t\t\t\t<a href='"); out.print(privateLayoutsPageCount > 0 ? portletURL.toString() : "javascript: ;"); out.write('\''); out.write('>'); out.print(title); out.write("</a>\r\n"); out.write("\t\t\t\t</li>\r\n"); out.write("\t\t\t\t"); int evalDoAfterBody = _jspx_th_c_005fif_005f2.doAfterBody(); if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN) break; } while (true); } if (_jspx_th_c_005fif_005f2.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) { _005fjspx_005ftagPool_005fc_005fif_005ftest.reuse(_jspx_th_c_005fif_005f2); return; } _005fjspx_005ftagPool_005fc_005fif_005ftest.reuse(_jspx_th_c_005fif_005f2); out.write("\r\n"); out.write("\r\n"); out.write("\t\t"); } out.write('\r'); out.write('\n'); int evalDoAfterBody = _jspx_th_c_005fif_005f0.doAfterBody(); if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN) break; } while (true); } if (_jspx_th_c_005fif_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) { _005fjspx_005ftagPool_005fc_005fif_005ftest.reuse(_jspx_th_c_005fif_005f0); return; } _005fjspx_005ftagPool_005fc_005fif_005ftest.reuse(_jspx_th_c_005fif_005f0); out.write('\r'); out.write('\n'); } catch (Throwable t) { if (!(t instanceof SkipPageException)) { out = _jspx_out; if (out != null && out.getBufferSize() != 0) out.clearBuffer(); if (_jspx_page_context != null) _jspx_page_context.handlePageException(t); } } finally { if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context); } }