mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
- Updated OpenSearch UI after Linton review
- Multiple OpenSearch clients can now be added to a single page - Configured OpenSearch as a dashlet - Made the lookup for beans in portal session more rigorous for AJAX invoke command - Updated paging graphics git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4942 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -93,20 +93,21 @@ public class InvokeCommand extends BaseAjaxCommand
|
||||
" on variable " + variableName +
|
||||
" with method " + methodName);
|
||||
|
||||
// retrieve the managed bean, this is really weak but if the
|
||||
// request comes from a portal server the bean we need to get
|
||||
// is in the session with a prefix chosen by the portal vendor,
|
||||
// to cover this scenario we have to go through the names of
|
||||
// all the objects in the session to find the bean we want.
|
||||
Object bean = null;
|
||||
|
||||
Object bean = null;
|
||||
if (Application.inPortalServer())
|
||||
{
|
||||
// retrieve the managed bean, this is really weak but if the
|
||||
// request comes from a portal server the bean we need to get
|
||||
// is in the session with a prefix chosen by the portal vendor,
|
||||
// to cover this scenario we have to go through the names of
|
||||
// all the objects in the session to find the bean we want.
|
||||
|
||||
String beanNameSuffix = "?" + variableName;
|
||||
Enumeration enumNames = request.getSession().getAttributeNames();
|
||||
while (enumNames.hasMoreElements())
|
||||
{
|
||||
String name = (String)enumNames.nextElement();
|
||||
if (name.endsWith(variableName))
|
||||
if (name.endsWith(beanNameSuffix))
|
||||
{
|
||||
bean = request.getSession().getAttribute(name);
|
||||
|
||||
@@ -118,8 +119,7 @@ public class InvokeCommand extends BaseAjaxCommand
|
||||
}
|
||||
}
|
||||
|
||||
// if we didn't find the bean it may be a request scope bean, in which
|
||||
// case go through the variable resolver to create it.
|
||||
// if we don't have the bean yet try and get it via the variable resolver
|
||||
if (bean == null)
|
||||
{
|
||||
VariableResolver vr = facesContext.getApplication().getVariableResolver();
|
||||
|
Reference in New Issue
Block a user