mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Ajax pop-up summary panel code refactored into generic library.
First cut of the My Tasks webscript.. Added "url.context" help object to template model for TemplateContentServlet. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5549 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -297,8 +297,8 @@ public abstract class BaseTemplateContentServlet extends BaseServlet
|
||||
}
|
||||
root.put("args", args);
|
||||
|
||||
// method to allow absolute client urls to be generated
|
||||
root.put("absurl", new AbsoluteUrlMethod(req.getContextPath()));
|
||||
// method to allow client urls to be generated
|
||||
root.put("url", new URLHelper(req.getContextPath()));
|
||||
|
||||
return root;
|
||||
}
|
||||
@@ -311,4 +311,22 @@ public abstract class BaseTemplateContentServlet extends BaseServlet
|
||||
return Utils.getFileTypeImage(getServletContext(), filename, small);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Helper to return context path for generating urls
|
||||
*/
|
||||
public static class URLHelper
|
||||
{
|
||||
String context;
|
||||
|
||||
public URLHelper(String context)
|
||||
{
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
public String getContext()
|
||||
{
|
||||
return context;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user