mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
JSR-168 Portlet and Alfresco Dashlet config for MySpaces portlet. Fixes for web-script JSF runtime to encode URL args as per servlet runtime.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5826 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -226,10 +226,12 @@
|
|||||||
jsp="/jsp/dashboards/dashlets/opensearch.jsp" />
|
jsp="/jsp/dashboards/dashlets/opensearch.jsp" />
|
||||||
<dashlet id="doclist-webscript" label="Document List" description="Document List WebScript"
|
<dashlet id="doclist-webscript" label="Document List" description="Document List WebScript"
|
||||||
jsp="/jsp/dashboards/dashlets/doclist-webscript.jsp" />
|
jsp="/jsp/dashboards/dashlets/doclist-webscript.jsp" />
|
||||||
|
<dashlet id="myspaces-webscript" label="My Spaces List" description="My Spaces WebScript"
|
||||||
|
jsp="/jsp/dashboards/dashlets/myspaces-webscript.jsp" />
|
||||||
<dashlet id="mytasks-webscript" label="My Tasks" description="My Tasks WebScript"
|
<dashlet id="mytasks-webscript" label="My Tasks" description="My Tasks WebScript"
|
||||||
jsp="/jsp/dashboards/dashlets/mytasks-webscript.jsp" />
|
jsp="/jsp/dashboards/dashlets/mytasks-webscript.jsp" />
|
||||||
<dashlet id="mywebforms-webscript" label="My Web Forms" description="My Web Forms WebScript"
|
<dashlet id="mywebforms-webscript" label="My Web Forms" description="My Web Forms WebScript"
|
||||||
jsp="/jsp/dashboards/dashlets/mywebforms-webscript.jsp" />
|
jsp="/jsp/dashboards/dashlets/mywebforms-webscript.jsp" />
|
||||||
</dashlets>
|
</dashlets>
|
||||||
<!-- set true allow the Guest user to configure the dashboard view - false by default -->
|
<!-- set true allow the Guest user to configure the dashboard view - false by default -->
|
||||||
<allow-guest-config>false</allow-guest-config>
|
<allow-guest-config>false</allow-guest-config>
|
||||||
|
@@ -24,6 +24,10 @@
|
|||||||
*/
|
*/
|
||||||
package org.alfresco.web.scripts.jsf;
|
package org.alfresco.web.scripts.jsf;
|
||||||
|
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
|
import java.net.URLDecoder;
|
||||||
|
|
||||||
|
import org.alfresco.error.AlfrescoRuntimeException;
|
||||||
import org.alfresco.web.scripts.WebScriptMatch;
|
import org.alfresco.web.scripts.WebScriptMatch;
|
||||||
import org.alfresco.web.scripts.WebScriptURLRequest;
|
import org.alfresco.web.scripts.WebScriptURLRequest;
|
||||||
|
|
||||||
@@ -50,6 +54,18 @@ public class WebScriptJSFRequest extends WebScriptURLRequest
|
|||||||
public WebScriptJSFRequest(String[] scriptUrlParts, WebScriptMatch match)
|
public WebScriptJSFRequest(String[] scriptUrlParts, WebScriptMatch match)
|
||||||
{
|
{
|
||||||
super(scriptUrlParts, match);
|
super(scriptUrlParts, match);
|
||||||
|
// decode url args (as they would be if this was a servlet)
|
||||||
|
try
|
||||||
|
{
|
||||||
|
for (String name : this.queryArgs.keySet())
|
||||||
|
{
|
||||||
|
this.queryArgs.put(name, URLDecoder.decode(this.queryArgs.get(name), "UTF-8"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (UnsupportedEncodingException e)
|
||||||
|
{
|
||||||
|
throw new AlfrescoRuntimeException("Unable to decode UTF-8 url!", e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@@ -63,6 +63,27 @@
|
|||||||
<short-title>Document List</short-title>
|
<short-title>Document List</short-title>
|
||||||
</portlet-info>
|
</portlet-info>
|
||||||
</portlet>
|
</portlet>
|
||||||
|
|
||||||
|
<portlet>
|
||||||
|
<description>My Spaces</description>
|
||||||
|
<portlet-name>AlfrescoMySpaces</portlet-name>
|
||||||
|
<portlet-class>org.alfresco.web.scripts.portlet.WebScriptPortlet</portlet-class>
|
||||||
|
|
||||||
|
<init-param>
|
||||||
|
<name>scriptUrl</name>
|
||||||
|
<value>/alfresco/service/myspaces</value>
|
||||||
|
</init-param>
|
||||||
|
|
||||||
|
<supports>
|
||||||
|
<mime-type>text/html</mime-type>
|
||||||
|
<portlet-mode>VIEW</portlet-mode>
|
||||||
|
</supports>
|
||||||
|
|
||||||
|
<portlet-info>
|
||||||
|
<title>My Spaces</title>
|
||||||
|
<short-title>My Spaces</short-title>
|
||||||
|
</portlet-info>
|
||||||
|
</portlet>
|
||||||
|
|
||||||
<portlet>
|
<portlet>
|
||||||
<description>My Web Forms</description>
|
<description>My Web Forms</description>
|
||||||
|
27
source/web/jsp/dashboards/dashlets/myspaces-webscript.jsp
Normal file
27
source/web/jsp/dashboards/dashlets/myspaces-webscript.jsp
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
<%--
|
||||||
|
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
||||||
|
|
||||||
|
* This program is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation; either version 2
|
||||||
|
* of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
* As a special exception to the terms and conditions of version 2.0 of
|
||||||
|
* the GPL, you may redistribute this Program in connection with Free/Libre
|
||||||
|
* and Open Source Software ("FLOSS") applications as described in Alfresco's
|
||||||
|
* FLOSS exception. You should have recieved a copy of the text describing
|
||||||
|
* the FLOSS exception, and it is also available here:
|
||||||
|
* http://www.alfresco.com/legal/licensing"
|
||||||
|
--%>
|
||||||
|
<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
|
||||||
|
|
||||||
|
<r:webScript scriptUrl="/alfresco/service/myspaces" />
|
Reference in New Issue
Block a user