mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
. Added notion of NodeEventListeners to BrowseBean.
. Fix for AWC-519 - Date pickers now show 2 year values into the future by default - for "effectivity date" searches and similar git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2386 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -25,7 +25,6 @@ import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.faces.context.FacesContext;
|
||||
import javax.faces.el.ValueBinding;
|
||||
import javax.servlet.ServletContext;
|
||||
import javax.servlet.http.HttpServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
@@ -159,20 +158,6 @@ public abstract class BaseServlet extends HttpServlet
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a JSF managed bean reference.
|
||||
*
|
||||
* @param fc FacesContext
|
||||
* @param name Name of the managed bean to return
|
||||
*
|
||||
* @return the managed bean or null if not found
|
||||
*/
|
||||
public static Object getManagedBean(FacesContext fc, String name)
|
||||
{
|
||||
ValueBinding vb = fc.getApplication().createValueBinding("#{" + name + "}");
|
||||
return vb.getValue(fc);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the specified JSP file is valid for a redirect after login.
|
||||
* Only a specific sub-set of the available JSPs are valid to jump directly too after a
|
||||
|
@@ -34,7 +34,6 @@ import org.alfresco.service.cmr.security.AccessStatus;
|
||||
import org.alfresco.service.cmr.security.PermissionService;
|
||||
import org.alfresco.web.app.Application;
|
||||
import org.alfresco.web.bean.BrowseBean;
|
||||
import org.alfresco.web.bean.LoginBean;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
@@ -109,7 +108,7 @@ public class ExternalAccessServlet extends BaseServlet
|
||||
|
||||
// we almost always need this bean reference
|
||||
FacesContext fc = FacesHelper.getFacesContext(req, res, getServletContext());
|
||||
BrowseBean browseBean = (BrowseBean)getManagedBean(fc, "BrowseBean");
|
||||
BrowseBean browseBean = (BrowseBean)FacesHelper.getManagedBean(fc, "BrowseBean");
|
||||
|
||||
// get services we need
|
||||
ServiceRegistry serviceRegistry = getServiceRegistry(getServletContext());
|
||||
|
@@ -20,6 +20,7 @@ import javax.faces.FactoryFinder;
|
||||
import javax.faces.component.UIViewRoot;
|
||||
import javax.faces.context.FacesContext;
|
||||
import javax.faces.context.FacesContextFactory;
|
||||
import javax.faces.el.ValueBinding;
|
||||
import javax.faces.lifecycle.Lifecycle;
|
||||
import javax.faces.lifecycle.LifecycleFactory;
|
||||
import javax.portlet.PortletContext;
|
||||
@@ -103,6 +104,20 @@ public final class FacesHelper
|
||||
return facesContext;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a JSF managed bean reference.
|
||||
*
|
||||
* @param fc FacesContext
|
||||
* @param name Name of the managed bean to return
|
||||
*
|
||||
* @return the managed bean or null if not found
|
||||
*/
|
||||
public static Object getManagedBean(FacesContext fc, String name)
|
||||
{
|
||||
ValueBinding vb = fc.getApplication().createValueBinding("#{" + name + "}");
|
||||
return vb.getValue(fc);
|
||||
}
|
||||
|
||||
/**
|
||||
* We need an inner class to be able to call FacesContext.setCurrentInstance
|
||||
* since it's a protected method
|
||||
|
Reference in New Issue
Block a user