Diverse Kleinigkeiten.
git-svn-id: https://svn.libreccm.org/ccm/trunk@808 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
d6c1c1ae57
commit
12246decb1
|
|
@ -79,7 +79,7 @@ public class Application extends Resource {
|
|||
private static final String SLASH = "/";
|
||||
|
||||
public static final String BASE_DATA_OBJECT_TYPE =
|
||||
"com.arsdigita.web.Application";
|
||||
"com.arsdigita.web.Application";
|
||||
|
||||
@Override
|
||||
protected String getBaseDataObjectType() {
|
||||
|
|
|
|||
|
|
@ -98,26 +98,29 @@ import org.apache.log4j.Logger;
|
|||
*/
|
||||
public class ApplicationFileServlet extends BaseApplicationServlet {
|
||||
|
||||
/** Logger instance for debugging */
|
||||
private static Logger s_log = Logger.getLogger(ApplicationFileServlet.class);
|
||||
|
||||
private String m_templatePath;
|
||||
private ApplicationFileResolver m_resolver;
|
||||
|
||||
/**
|
||||
*
|
||||
* Servlet Standard Initializer.
|
||||
* @param config
|
||||
* @throws ServletException
|
||||
*/
|
||||
@Override
|
||||
public void init(ServletConfig config)
|
||||
throws ServletException {
|
||||
super.init(config);
|
||||
|
||||
// init-param named template-path from ~/WEB-INF/web.xml
|
||||
m_templatePath = config.getInitParameter("template-path");
|
||||
Assert.exists(m_templatePath, String.class);
|
||||
Assert.isTrue(m_templatePath.startsWith("/"),
|
||||
"template-path starts with '/'");
|
||||
Assert.isTrue(!m_templatePath.endsWith("/"),
|
||||
"template-path does not end with '/'");
|
||||
"template-path must not end with '/'");
|
||||
|
||||
|
||||
String resolverName = config.getInitParameter("file-resolver");
|
||||
|
|
|
|||
|
|
@ -34,14 +34,22 @@ public class DefaultApplicationFileResolver implements ApplicationFileResolver {
|
|||
private static Logger s_log =
|
||||
Logger.getLogger(DefaultApplicationFileResolver.class);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param templatePath
|
||||
* @param sreq
|
||||
* @param sresp
|
||||
* @param app
|
||||
* @return
|
||||
*/
|
||||
public RequestDispatcher resolve(String templatePath,
|
||||
HttpServletRequest sreq,
|
||||
HttpServletResponse sresp,
|
||||
Application app) {
|
||||
// XXX proper list of dependent & customization webapps to search
|
||||
String[] webapps = new String[] {
|
||||
app.getContextPath(), "ROOT"
|
||||
};
|
||||
app.getContextPath(), "ROOT"
|
||||
};
|
||||
String pathInfo = sreq.getPathInfo();
|
||||
|
||||
if (s_log.isDebugEnabled()) {
|
||||
|
|
@ -61,8 +69,8 @@ public class DefaultApplicationFileResolver implements ApplicationFileResolver {
|
|||
}
|
||||
|
||||
RequestDispatcher rd = Web.findResourceDispatcher(
|
||||
webapps,
|
||||
path + WELCOME_FILES[i]);
|
||||
webapps,
|
||||
path + WELCOME_FILES[i]);
|
||||
if (rd != null) {
|
||||
if (s_log.isDebugEnabled()) {
|
||||
s_log.debug("Got dispatcher " + rd);
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ public class Initializer extends CompoundInitializer {
|
|||
*
|
||||
* @param evt
|
||||
*/
|
||||
@Override
|
||||
public void init(DomainInitEvent evt) {
|
||||
super.init(evt);
|
||||
|
||||
|
|
|
|||
|
|
@ -106,6 +106,7 @@ public class Workspace extends Application {
|
|||
* @return ServletPath (constant) probably should be synchron with web.xml
|
||||
* entry
|
||||
*/
|
||||
@Override
|
||||
public String getServletPath() {
|
||||
// return "/files";
|
||||
return "/ccm-ldn-portal/files";
|
||||
|
|
@ -238,6 +239,7 @@ public class Workspace extends Application {
|
|||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void beforeSave() {
|
||||
// If no permissions are configured, then setup empty groups
|
||||
if (get(PARTY) == null) {
|
||||
|
|
@ -261,6 +263,7 @@ public class Workspace extends Application {
|
|||
// This method wouldn't need to exist if permissioning used
|
||||
// the associations rather than direct queries which require
|
||||
// the object to be saved
|
||||
@Override
|
||||
public void afterSave() {
|
||||
super.afterSave();
|
||||
|
||||
|
|
@ -371,6 +374,7 @@ public class Workspace extends Application {
|
|||
throw new DataObjectNotFoundException("cannot find workspace for party");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete() {
|
||||
clearPages();
|
||||
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@
|
|||
</xsl:variable>
|
||||
|
||||
<a href="{@url}" title="{$title}">
|
||||
<img src="{$here}/{@name}.gif" border="0" alt="{$title}"/>
|
||||
<img src="{@name}.gif" border="0" alt="{$title}"/>
|
||||
</a>
|
||||
</th>
|
||||
</xsl:for-each>
|
||||
|
|
@ -151,16 +151,16 @@
|
|||
<xsl:when test="@isSelected = 'false'">
|
||||
<td class="tab-label">
|
||||
<a href="{@moveLeftAction}">
|
||||
<img src="{$here}/moveLeft.gif" border="0" style="margin-left: 5px"/>
|
||||
<img src="moveLeft.gif" border="0" style="margin-left: 5px"/>
|
||||
</a>
|
||||
<a href="{@moveRightAction}">
|
||||
<img src="{$here}/moveRight.gif" border="0" style="margin-left: 5px"/>
|
||||
<img src="moveRight.gif" border="0" style="margin-left: 5px"/>
|
||||
</a>
|
||||
<a href="{@selectAction}">
|
||||
<xsl:value-of select="title"/>
|
||||
</a>
|
||||
<a href="{@deleteAction}" onclick="return confirm('Are you sure you want to delete this pane')">
|
||||
<img src="{$here}/delete.gif" border="0" style="margin-left: 5px"/>
|
||||
<img src="delete.gif" border="0" style="margin-left: 5px"/>
|
||||
</a>
|
||||
</td>
|
||||
<td class="tab-end"/>
|
||||
|
|
@ -172,12 +172,12 @@
|
|||
<tr>
|
||||
<td>
|
||||
<a href="{@moveLeftAction}">
|
||||
<img src="{$here}/moveLeft.gif" border="0" style="margin-left: 5px"/>
|
||||
<img src="moveLeft.gif" border="0" style="margin-left: 5px"/>
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="{@moveRightAction}">
|
||||
<img src="{$here}/moveRight.gif" border="0" style="margin-left: 5px"/>
|
||||
<img src="moveRight.gif" border="0" style="margin-left: 5px"/>
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
|
|
@ -185,7 +185,7 @@
|
|||
</td>
|
||||
<td>
|
||||
<a href="{@deleteAction}" onclick="return confirm('Are you sure you want to delete this pane')">
|
||||
<img src="{$here}/delete.gif" border="0" style="margin-left: 5px"/>
|
||||
<img src="delete.gif" border="0" style="margin-left: 5px"/>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
@ -197,14 +197,14 @@
|
|||
<xsl:otherwise>
|
||||
<td class="current-tab-label">
|
||||
<a href="{@moveLeftAction}">
|
||||
<img src="{$here}/moveLeft.gif" border="0" style="margin-left: 5px"/>
|
||||
<img src="moveLeft.gif" border="0" style="margin-left: 5px"/>
|
||||
</a>
|
||||
<a href="{@moveRightAction}">
|
||||
<img src="{$here}/moveRight.gif" border="0" style="margin-left: 5px"/>
|
||||
<img src="moveRight.gif" border="0" style="margin-left: 5px"/>
|
||||
</a>
|
||||
<xsl:value-of select="title"/>
|
||||
<a href="{@deleteAction}" onclick="return confirm('Are you sure you want to delete this pane')">
|
||||
<img src="{$here}/delete.gif" border="0" style="margin-left: 5px"/>
|
||||
<img src="delete.gif" border="0" style="margin-left: 5px"/>
|
||||
</a>
|
||||
</td>
|
||||
<td class="current-tab-end"/>
|
||||
|
|
|
|||
Loading…
Reference in New Issue