mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
various minor bug fixes to create/edit form, parseXMLDocuments
- WCM-351 fixes to select workflow screen on IE (weird onchange behavior) - WCM-468 fixes to remove rendering engine - doing the jsp 2.0 thing - WCM-427 fix to encoding issue with parseXMLDocuements - fix for remove rendering engine templates in create form (wasn't clearing the list in init) git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5630 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -32,6 +32,7 @@ import freemarker.template.TemplateModelException;
|
||||
import java.io.*;
|
||||
import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
import java.net.URLEncoder;
|
||||
import java.text.MessageFormat;
|
||||
import java.util.*;
|
||||
import javax.faces.context.FacesContext;
|
||||
@@ -57,6 +58,7 @@ import org.alfresco.service.cmr.remote.AVMRemote;
|
||||
import org.alfresco.web.app.Application;
|
||||
import org.alfresco.web.bean.repository.Repository;
|
||||
import org.alfresco.web.bean.wcm.AVMConstants;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.web.context.WebApplicationContext;
|
||||
@@ -378,10 +380,15 @@ public class RenderingEngineTemplateImpl
|
||||
}
|
||||
}
|
||||
|
||||
URI uri = null;
|
||||
try
|
||||
{
|
||||
uri = new URI(webappUrl + (name.charAt(0) == '/' ? name : '/' + name));
|
||||
final String[] path = (name.startsWith("/") ? name.substring(1) : name).split("/");
|
||||
for (int i = 0; i < path.length; i++)
|
||||
{
|
||||
path[i] = URLEncoder.encode(path[i], "utf-8").replace("+", "%20");
|
||||
}
|
||||
|
||||
final URI uri = new URI(webappUrl + '/' + StringUtils.join(path, '/'));
|
||||
if (LOGGER.isDebugEnabled())
|
||||
LOGGER.debug("loading " + uri);
|
||||
return uri.toURL().openStream();
|
||||
|
@@ -149,10 +149,15 @@ public class XMLUtil
|
||||
throws SAXException,
|
||||
IOException
|
||||
{
|
||||
final DocumentBuilder db = XMLUtil.getDocumentBuilder();
|
||||
final Document result = db.parse(source);
|
||||
source.close();
|
||||
return result;
|
||||
try
|
||||
{
|
||||
final DocumentBuilder db = XMLUtil.getDocumentBuilder();
|
||||
return db.parse(source);
|
||||
}
|
||||
finally
|
||||
{
|
||||
source.close();
|
||||
}
|
||||
}
|
||||
|
||||
/** provides a document builder that is namespace aware but not validating by default */
|
||||
|
Reference in New Issue
Block a user