. Fix to JbossPortal case to handle web-client startup changes from last checkin

- Guest and others can correctly navigate to MyAlfresco on login

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3655 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2006-09-01 17:45:51 +00:00
parent 445fb40e86
commit 78196e1005
2 changed files with 24 additions and 1 deletions

View File

@@ -33,6 +33,7 @@ import javax.portlet.RenderRequest;
import javax.portlet.RenderResponse; import javax.portlet.RenderResponse;
import javax.portlet.UnavailableException; import javax.portlet.UnavailableException;
import org.alfresco.config.ConfigService;
import org.alfresco.i18n.I18NUtil; import org.alfresco.i18n.I18NUtil;
import org.alfresco.repo.security.authentication.AuthenticationException; import org.alfresco.repo.security.authentication.AuthenticationException;
import org.alfresco.service.cmr.security.AuthenticationService; import org.alfresco.service.cmr.security.AuthenticationService;
@@ -43,7 +44,9 @@ import org.alfresco.web.app.servlet.AuthenticationStatus;
import org.alfresco.web.bean.ErrorBean; import org.alfresco.web.bean.ErrorBean;
import org.alfresco.web.bean.FileUploadBean; import org.alfresco.web.bean.FileUploadBean;
import org.alfresco.web.bean.LoginBean; import org.alfresco.web.bean.LoginBean;
import org.alfresco.web.bean.NavigationBean;
import org.alfresco.web.bean.repository.User; import org.alfresco.web.bean.repository.User;
import org.alfresco.web.config.ClientConfigElement;
import org.apache.commons.fileupload.FileItem; import org.apache.commons.fileupload.FileItem;
import org.apache.commons.fileupload.disk.DiskFileItemFactory; import org.apache.commons.fileupload.disk.DiskFileItemFactory;
import org.apache.commons.fileupload.portlet.PortletFileUpload; import org.apache.commons.fileupload.portlet.PortletFileUpload;
@@ -259,7 +262,18 @@ public class AlfrescoFacesPortlet extends MyFacesGenericPortlet
// perform the forward to the page processed by the Faces servlet // perform the forward to the page processed by the Faces servlet
response.setContentType("text/html"); response.setContentType("text/html");
request.getPortletSession().setAttribute(PortletUtil.PORTLET_REQUEST_FLAG, "true"); request.getPortletSession().setAttribute(PortletUtil.PORTLET_REQUEST_FLAG, "true");
nonFacesRequest(request, response, "/jsp/browse/browse.jsp");
// get the start location as configured by the web-client config
ConfigService configService = (ConfigService)ctx.getBean("webClientConfigService");
ClientConfigElement configElement = (ClientConfigElement)configService.getGlobalConfig().getConfigElement("client");
if (NavigationBean.LOCATION_MYALFRESCO.equals(configElement.getInitialLocation()))
{
nonFacesRequest(request, response, "/jsp/dashboards/container.jsp");
}
else
{
nonFacesRequest(request, response, "/jsp/browse/browse.jsp");
}
} }
else else
{ {

View File

@@ -260,6 +260,15 @@ public class NavigationBean
} }
else if (LOCATION_MYALFRESCO.equals(location)) else if (LOCATION_MYALFRESCO.equals(location))
{ {
// make sure we set a current node ID as some screens expect this
if (getCurrentNodeId() == null)
{
String homeSpaceId = Application.getCurrentUser(context).getHomeSpaceId();
NodeRef homeSpaceRef = new NodeRef(Repository.getStoreRef(), homeSpaceId);
setCurrentNodeId(homeSpaceRef.getId());
}
// create a breadcrumb handler for this special case location (not a node)
List<IBreadcrumbHandler> elements = new ArrayList<IBreadcrumbHandler>(1); List<IBreadcrumbHandler> elements = new ArrayList<IBreadcrumbHandler>(1);
elements.add(new IBreadcrumbHandler() elements.add(new IBreadcrumbHandler()
{ {