diff --git a/config/alfresco/templates/webscripts/org/alfresco/office/documentDetails.get.html.ftl b/config/alfresco/templates/webscripts/org/alfresco/office/documentDetails.get.html.ftl
index b543eef395..3a0c4600bf 100644
--- a/config/alfresco/templates/webscripts/org/alfresco/office/documentDetails.get.html.ftl
+++ b/config/alfresco/templates/webscripts/org/alfresco/office/documentDetails.get.html.ftl
@@ -67,7 +67,7 @@
Categories: |
- <#if d.hasAspect("cm:generalclassifiable")>
+ <#if d.properties.categories?exists>
<#list d.properties.categories as category>
${companyhome.nodeByReference[category].name};
#list>
diff --git a/source/java/org/alfresco/web/bean/wcm/EditWebContentWizard.java b/source/java/org/alfresco/web/bean/wcm/EditWebContentWizard.java
index a826a6da86..595b14712f 100644
--- a/source/java/org/alfresco/web/bean/wcm/EditWebContentWizard.java
+++ b/source/java/org/alfresco/web/bean/wcm/EditWebContentWizard.java
@@ -155,7 +155,6 @@ public class EditWebContentWizard extends CreateWebContentWizard
}
AVMLock lock = this.avmLockingService.getLock(AVMUtil.getStoreId(this.createdPath),
AVMUtil.getStoreRelativePath(this.createdPath));
- String previousStore = lock.getStore();
if (lock != null)
{
LOGGER.debug("transferring lock from " + lock.getStore() +
@@ -172,13 +171,6 @@ public class EditWebContentWizard extends CreateWebContentWizard
this.content = XMLUtil.toString(this.instanceDataDocument, false);
writer.putContent(this.content);
- LOGGER.debug("transferring lock back to " + previousStore);
- this.avmLockingService.modifyLock(AVMUtil.getStoreId(this.createdPath),
- AVMUtil.getStoreRelativePath(this.createdPath),
- null,
- previousStore,
- null,
- null);
// XXXarielb might not need to do this reload
this.formInstanceData = this.formsService.getFormInstanceData(-1, this.createdPath);
for (final Rendition r : this.formInstanceData.getRenditions())
@@ -211,16 +203,25 @@ public class EditWebContentWizard extends CreateWebContentWizard
{
final Rendition r = rr.getRendition();
this.renditions.add(r);
- LOGGER.debug("transferring lock for " + r.getPath() + " back to " + previousStore);
+ LOGGER.debug("transferring lock for " + r.getPath() +
+ " back to " + AVMUtil.getCorrespondingMainStoreName(AVMUtil.getStoreName(r.getPath())));
this.avmLockingService.modifyLock(AVMUtil.getStoreId(r.getPath()),
AVMUtil.getStoreRelativePath(r.getPath()),
null,
- previousStore,
+ AVMUtil.getCorrespondingMainStoreName(AVMUtil.getStoreName(r.getPath())),
null,
null);
}
}
+ LOGGER.debug("transferring form instance data lock back to " +
+ AVMUtil.getCorrespondingMainStoreName(AVMUtil.getStoreName(this.createdPath)));
+ this.avmLockingService.modifyLock(AVMUtil.getStoreId(this.createdPath),
+ AVMUtil.getStoreRelativePath(this.createdPath),
+ null,
+ AVMUtil.getCorrespondingMainStoreName(AVMUtil.getStoreName(this.createdPath)),
+ null,
+ null);
}
/** Indicates whether or not the wizard is currently in edit mode */
diff --git a/source/java/org/alfresco/web/bean/wcm/RegenerateRenditionsWizard.java b/source/java/org/alfresco/web/bean/wcm/RegenerateRenditionsWizard.java
index 7293c613a9..cbea440c11 100644
--- a/source/java/org/alfresco/web/bean/wcm/RegenerateRenditionsWizard.java
+++ b/source/java/org/alfresco/web/bean/wcm/RegenerateRenditionsWizard.java
@@ -50,6 +50,7 @@ import org.alfresco.model.WCMAppModel;
import org.alfresco.repo.avm.AVMNodeConverter;
import org.alfresco.repo.content.MimetypeMap;
import org.alfresco.service.cmr.avm.AVMService;
+import org.alfresco.service.cmr.avm.locking.AVMLockingService;
import org.alfresco.service.cmr.avmsync.AVMDifference;
import org.alfresco.service.cmr.avmsync.AVMSyncService;
import org.alfresco.service.cmr.model.FileExistsException;
@@ -85,6 +86,7 @@ public class RegenerateRenditionsWizard
private final static Log LOGGER = LogFactory.getLog(RegenerateRenditionsWizard.class);
+ private AVMLockingService avmLockingService;
private AVMService avmService;
private AVMSyncService avmSyncService;
private ContentService contentService;
@@ -119,21 +121,22 @@ public class RegenerateRenditionsWizard
final ResourceBundle bundle = Application.getBundle(FacesContext.getCurrentInstance());
if (this.regenerateScope.equals(REGENERATE_SCOPE_FORM))
{
- description = MessageFormat.format("regenerate_renditions_snapshot_description_scope_form",
+ description = MessageFormat.format(bundle.getString("regenerate_renditions_snapshot_description_scope_form"),
StringUtils.join(this.selectedForms, ", "));
}
else if (this.regenerateScope.equals(REGENERATE_SCOPE_RENDERING_ENGINE_TEMPLATE))
{
- description = MessageFormat.format("regenerate_renditions_snapshot_description_scope_rendering_engine_template",
+ description = MessageFormat.format(bundle.getString("regenerate_renditions_snapshot_description_scope_rendering_engine_template"),
StringUtils.join(this.selectedRenderingEngineTemplates, ", "));
}
else
{
- description = MessageFormat.format("regenerate_renditions_snapshot_description_scope_web_project",
+ description = MessageFormat.format(bundle.getString("regenerate_renditions_snapshot_description_scope_web_project"),
this.selectedWebProject.getName());
}
this.avmService.createSnapshot(this.selectedWebProject.getStoreId(),
- MessageFormat.format("regenerate_renditions_snapshot_short_description", diffList.size()),
+ MessageFormat.format(bundle.getString("regenerate_renditions_snapshot_short_description"),
+ diffList.size()),
description);
}
return outcome;
@@ -385,6 +388,14 @@ public class RegenerateRenditionsWizard
this.avmService = avmService;
}
+ /**
+ * @param avmLockingService The AVMLockingService to set.
+ */
+ public void setAvmLockingService(final AVMLockingService avmLockingService)
+ {
+ this.avmLockingService = avmLockingService;
+ }
+
/**
* @param avmSyncService The AVMSyncService to set.
*/
@@ -506,7 +517,8 @@ public class RegenerateRenditionsWizard
{
final String formName = this.selectedRenderingEngineTemplates[i].split(":")[0];
final Form f = this.selectedWebProject.getForm(formName);
- final RenderingEngineTemplate ret = f.getRenderingEngineTemplate((String)this.selectedRenderingEngineTemplates[i].split(":")[1]);
+ final RenderingEngineTemplate ret =
+ f.getRenderingEngineTemplate((String)this.selectedRenderingEngineTemplates[i].split(":")[1]);
query.append("@" + Repository.escapeQName(WCMAppModel.PROP_PARENT_RENDERING_ENGINE_TEMPLATE) +
":\"" + ((RenderingEngineTemplateImpl)ret).getNodeRef() + "\"");
if (i != this.selectedRenderingEngineTemplates.length - 1)
@@ -544,7 +556,8 @@ public class RegenerateRenditionsWizard
{
if (rr.getException() != null)
{
- Utils.addErrorMessage("error regenerating rendition using " + rr.getRenderingEngineTemplate().getName() +
+ Utils.addErrorMessage("error regenerating rendition using " +
+ rr.getRenderingEngineTemplate().getName() +
": " + rr.getException().getMessage(),
rr.getException());
}
@@ -552,11 +565,18 @@ public class RegenerateRenditionsWizard
{
result.add(rr.getRendition());
}
+ if (rr.getRendition() != null)
+ {
+ this.avmLockingService.removeLock(AVMUtil.getStoreId(rr.getRendition().getPath()),
+ AVMUtil.getStoreRelativePath(rr.getRendition().getPath()));
+ }
}
}
catch (FormNotFoundException fnfe)
{
- Utils.addErrorMessage("error regenerating renditions of " + fid.getPath() + ": " + fnfe.getMessage(), fnfe);
+ Utils.addErrorMessage("error regenerating renditions of " + fid.getPath() +
+ ": " + fnfe.getMessage(),
+ fnfe);
}
}
else
@@ -569,7 +589,8 @@ public class RegenerateRenditionsWizard
}
catch (Exception e)
{
- Utils.addErrorMessage("error regenerating rendition using " + r.getRenderingEngineTemplate().getName() +
+ Utils.addErrorMessage("error regenerating rendition using " +
+ r.getRenderingEngineTemplate().getName() +
": " + e.getMessage(),
e);
}
diff --git a/source/java/org/alfresco/web/forms/FormImpl.java b/source/java/org/alfresco/web/forms/FormImpl.java
index f91d74da9d..794075a6c2 100644
--- a/source/java/org/alfresco/web/forms/FormImpl.java
+++ b/source/java/org/alfresco/web/forms/FormImpl.java
@@ -171,6 +171,7 @@ public class FormImpl
final Map root = new HashMap();
root.put("webapp", webappName);
root.put("xml", NodeModel.wrap(formInstanceData));
+ root.put("extension", "xml");
root.put("name", formInstanceDataName);
root.put("date", new SimpleDate(new Date(), SimpleDate.DATETIME));
root.put("cwd", AVMUtil.getWebappRelativePath(parentAVMPath));
diff --git a/source/java/org/alfresco/web/forms/FormInstanceDataImpl.java b/source/java/org/alfresco/web/forms/FormInstanceDataImpl.java
index 51231971f9..bce2bd56c0 100644
--- a/source/java/org/alfresco/web/forms/FormInstanceDataImpl.java
+++ b/source/java/org/alfresco/web/forms/FormInstanceDataImpl.java
@@ -68,8 +68,10 @@ import org.xml.sax.SAXException;
{
throw new NullPointerException();
}
- final NodeService nodeService = this.getServiceRegistry().getNodeService();
- if (!nodeService.hasAspect(nodeRef, WCMAppModel.ASPECT_FORM_INSTANCE_DATA))
+ final AVMService avmService = this.getServiceRegistry().getAVMService();
+ if (!avmService.hasAspect(AVMNodeConverter.ToAVMVersionPath(nodeRef).getFirst(),
+ AVMNodeConverter.ToAVMVersionPath(nodeRef).getSecond(),
+ WCMAppModel.ASPECT_FORM_INSTANCE_DATA))
{
throw new IllegalArgumentException("node " + nodeRef +
" does not have aspect " + WCMAppModel.ASPECT_FORM_INSTANCE_DATA);
@@ -77,7 +79,7 @@ import org.xml.sax.SAXException;
this.nodeRef = nodeRef;
this.formsService = formsService;
}
-
+
/* package */ FormInstanceDataImpl(final int version,
final String avmPath,
final FormsService formsService)
@@ -88,9 +90,11 @@ import org.xml.sax.SAXException;
/** the name of this rendition */
public String getName()
{
- final NodeService nodeService = this.getServiceRegistry().getNodeService();
- return (String)
- nodeService.getProperty(this.nodeRef, ContentModel.PROP_NAME);
+// final AVMService avmService = this.getServiceRegistry().getAVMService();
+// return avmService.getNodeProperty(AVMNodeConverter.ToAVMVersionPath(this.nodeRef).getFirst(),
+// AVMNodeConverter.ToAVMVersionPath(this.nodeRef).getSecond(),
+// ContentModel.PROP_NAME).getStringValue();
+ return AVMNodeConverter.SplitBase(AVMNodeConverter.ToAVMVersionPath(this.nodeRef).getSecond())[1];
}
public String getWebappRelativePath()
@@ -111,8 +115,9 @@ import org.xml.sax.SAXException;
public Document getDocument()
throws IOException, SAXException
{
- return XMLUtil.parse(this.getNodeRef(),
- this.getServiceRegistry().getContentService());
+ return XMLUtil.parse(AVMNodeConverter.ToAVMVersionPath(nodeRef).getFirst(),
+ AVMNodeConverter.ToAVMVersionPath(nodeRef).getSecond(),
+ this.getServiceRegistry().getAVMService());
}
public Form getForm()
@@ -145,9 +150,14 @@ import org.xml.sax.SAXException;
{
if (LOGGER.isDebugEnabled())
LOGGER.debug("regenerating renditions of " + this);
- String originalParentAvmPath = (String)
- this.getServiceRegistry().getNodeService().getProperty(this.getNodeRef(),
- WCMAppModel.PROP_ORIGINAL_PARENT_PATH);
+
+
+ final AVMService avmService = this.getServiceRegistry().getAVMService();
+ String originalParentAvmPath =
+ avmService.getNodeProperty(AVMNodeConverter.ToAVMVersionPath(this.nodeRef).getFirst(),
+ AVMNodeConverter.ToAVMVersionPath(this.nodeRef).getSecond(),
+ WCMAppModel.PROP_ORIGINAL_PARENT_PATH).getStringValue();
+
if (originalParentAvmPath == null)
{
originalParentAvmPath = AVMNodeConverter.SplitBase(this.getPath())[0];
@@ -274,8 +284,9 @@ import org.xml.sax.SAXException;
protected String getParentFormName()
{
- final NodeService nodeService = this.getServiceRegistry().getNodeService();
- return (String) nodeService.getProperty(this.nodeRef,
- WCMAppModel.PROP_PARENT_FORM_NAME);
+ final AVMService avmService = this.getServiceRegistry().getAVMService();
+ return avmService.getNodeProperty(AVMNodeConverter.ToAVMVersionPath(this.nodeRef).getFirst(),
+ AVMNodeConverter.ToAVMVersionPath(this.nodeRef).getSecond(),
+ WCMAppModel.PROP_PARENT_FORM_NAME).getStringValue();
}
}
diff --git a/source/java/org/alfresco/web/forms/FormsTest.java b/source/java/org/alfresco/web/forms/FormsTest.java
index c1e429432f..264af465c8 100644
--- a/source/java/org/alfresco/web/forms/FormsTest.java
+++ b/source/java/org/alfresco/web/forms/FormsTest.java
@@ -252,23 +252,53 @@ public class FormsTest
XMLUtil.parse("foo"),
"foo",
"avmstore:/www/avm_webapps/webapp/dir",
- "webapp")/*,
+ "webapp"),
new OutputPathPatternTest("avmstore:/www/avm_webapps/webapp/dir/foo.xml",
+ "${xml[\"/*[name()='foons:root_tag']/*[name()='foons:name']\"]}.xml",
+ XMLUtil.parse("foo"),
+ "foo",
+ "avmstore:/www/avm_webapps/webapp/dir",
+ "webapp"),
+ new OutputPathPatternTest("avmstore:/www/avm_webapps/webapp/dir/foo.xml",
+ "${xml['/foons:root_tag/foons:name']}.xml",
+ XMLUtil.parse("foo"),
+ "foo",
+ "avmstore:/www/avm_webapps/webapp/dir",
+ "webapp"),
+ new OutputPathPatternTest(null,
"${xml.root_tag.name}",
XMLUtil.parse("foo"),
"foo",
"avmstore:/www/avm_webapps/webapp/dir",
- "webapp")*/
+ "webapp")
};
for (final OutputPathPatternTest oppt : opps)
{
this.mockForm.setOutputPathPattern(oppt.pattern);
- assertEquals(oppt.pattern + " failed",
- oppt.expected,
- this.mockForm.getOutputPathForFormInstanceData(oppt.xml,
- oppt.name,
- oppt.parentAVMPath,
- oppt.webapp));
+ if (oppt.expected == null)
+ {
+ try
+ {
+ this.mockForm.getOutputPathForFormInstanceData(oppt.xml,
+ oppt.name,
+ oppt.parentAVMPath,
+ oppt.webapp);
+ fail("expected pattern " + oppt.pattern + " to fail");
+ }
+ catch (Exception e)
+ {
+ // expected failure
+ }
+ }
+ else
+ {
+ assertEquals(oppt.pattern + " failed",
+ oppt.expected,
+ this.mockForm.getOutputPathForFormInstanceData(oppt.xml,
+ oppt.name,
+ oppt.parentAVMPath,
+ oppt.webapp));
+ }
}
}
}
\ No newline at end of file
diff --git a/source/java/org/alfresco/web/forms/RenderingEngineTemplateImpl.java b/source/java/org/alfresco/web/forms/RenderingEngineTemplateImpl.java
index 2d27cc740a..dcb837715e 100644
--- a/source/java/org/alfresco/web/forms/RenderingEngineTemplateImpl.java
+++ b/source/java/org/alfresco/web/forms/RenderingEngineTemplateImpl.java
@@ -274,7 +274,8 @@ public class RenderingEngineTemplateImpl
avmService.addAspect(renditionAvmPath, WCMAppModel.ASPECT_RENDITION);
}
- final Rendition result = new RenditionImpl(AVMNodeConverter.ToNodeRef(-1, renditionAvmPath),
+ final Rendition result = new RenditionImpl(-1,
+ renditionAvmPath,
this.formsService);
this.render(formInstanceData, result);
diff --git a/source/java/org/alfresco/web/forms/RenditionImpl.java b/source/java/org/alfresco/web/forms/RenditionImpl.java
index c4990ba086..43fbadc01e 100644
--- a/source/java/org/alfresco/web/forms/RenditionImpl.java
+++ b/source/java/org/alfresco/web/forms/RenditionImpl.java
@@ -37,7 +37,6 @@ import org.alfresco.service.ServiceRegistry;
import org.alfresco.service.cmr.avm.AVMService;
import org.alfresco.service.cmr.dictionary.DataTypeDefinition;
import org.alfresco.service.cmr.repository.NodeRef;
-import org.alfresco.service.cmr.repository.NodeService;
import org.alfresco.util.Pair;
import org.alfresco.web.bean.repository.Repository;
import org.alfresco.web.bean.wcm.AVMUtil;
@@ -71,8 +70,10 @@ import org.xml.sax.SAXException;
{
throw new NullPointerException();
}
- final NodeService nodeService = this.getServiceRegistry().getNodeService();
- if (!nodeService.hasAspect(nodeRef, WCMAppModel.ASPECT_RENDITION))
+ final AVMService avmService = this.getServiceRegistry().getAVMService();
+ if (!avmService.hasAspect(AVMNodeConverter.ToAVMVersionPath(nodeRef).getFirst(),
+ AVMNodeConverter.ToAVMVersionPath(nodeRef).getSecond(),
+ WCMAppModel.ASPECT_RENDITION))
{
throw new IllegalArgumentException("node " + nodeRef +
" does not have aspect " + WCMAppModel.ASPECT_RENDITION);
@@ -91,17 +92,20 @@ import org.xml.sax.SAXException;
/** the name of this rendition */
public String getName()
{
- final NodeService nodeService = this.getServiceRegistry().getNodeService();
- return (String)
- nodeService.getProperty(this.nodeRef, ContentModel.PROP_NAME);
+// final AVMService avmService = this.getServiceRegistry().getAVMService();
+// return avmService.getNodeProperty(AVMNodeConverter.ToAVMVersionPath(this.nodeRef).getFirst(),
+// AVMNodeConverter.ToAVMVersionPath(this.nodeRef).getSecond(),
+// ContentModel.PROP_NAME).getStringValue();
+ return AVMNodeConverter.SplitBase(AVMNodeConverter.ToAVMVersionPath(this.nodeRef).getSecond())[1];
}
/** the description of this rendition */
public String getDescription()
{
- final NodeService nodeService = this.getServiceRegistry().getNodeService();
- return (String)
- nodeService.getProperty(this.nodeRef, ContentModel.PROP_DESCRIPTION);
+ final AVMService avmService = this.getServiceRegistry().getAVMService();
+ return avmService.getNodeProperty(AVMNodeConverter.ToAVMVersionPath(this.nodeRef).getFirst(),
+ AVMNodeConverter.ToAVMVersionPath(this.nodeRef).getSecond(),
+ ContentModel.PROP_DESCRIPTION).getStringValue();
}
public String getWebappRelativePath()
diff --git a/source/java/org/alfresco/web/forms/XMLUtil.java b/source/java/org/alfresco/web/forms/XMLUtil.java
index 71da4c06a9..e95713fa41 100644
--- a/source/java/org/alfresco/web/forms/XMLUtil.java
+++ b/source/java/org/alfresco/web/forms/XMLUtil.java
@@ -33,6 +33,7 @@ import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import org.alfresco.model.ContentModel;
+import org.alfresco.service.cmr.avm.AVMService;
import org.alfresco.service.cmr.repository.ContentReader;
import org.alfresco.service.cmr.repository.ContentService;
import org.alfresco.service.cmr.repository.NodeRef;
@@ -94,7 +95,7 @@ public class XMLUtil
assert false : te.getMessage();
}
}
-
+
/** utility function for serializing a node */
public static void print(final Node n, final File output)
throws IOException
@@ -135,6 +136,16 @@ public class XMLUtil
final InputStream in = contentReader.getContentInputStream();
return XMLUtil.parse(in);
}
+
+ /** utility function for parsing xml */
+ public static Document parse(final int version,
+ final String path,
+ final AVMService avmService)
+ throws SAXException,
+ IOException
+ {
+ return XMLUtil.parse(avmService.getFileInputStream(version, path));
+ }
/** utility function for parsing xml */
public static Document parse(final File source)
diff --git a/source/java/org/alfresco/web/forms/XSLTRenderingEngine.java b/source/java/org/alfresco/web/forms/XSLTRenderingEngine.java
index 7e1e9db02c..bc26b6c7fc 100644
--- a/source/java/org/alfresco/web/forms/XSLTRenderingEngine.java
+++ b/source/java/org/alfresco/web/forms/XSLTRenderingEngine.java
@@ -39,7 +39,6 @@ import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.sax.TransformerHandler;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
-import org.alfresco.service.cmr.repository.ContentService;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.NodeService;
import org.alfresco.service.namespace.NamespaceService;
diff --git a/source/java/org/alfresco/web/forms/xforms/Schema2XFormsTest.java b/source/java/org/alfresco/web/forms/xforms/Schema2XFormsTest.java
index 197dbc5a14..bffaad61a0 100644
--- a/source/java/org/alfresco/web/forms/xforms/Schema2XFormsTest.java
+++ b/source/java/org/alfresco/web/forms/xforms/Schema2XFormsTest.java
@@ -361,6 +361,41 @@ public class Schema2XFormsTest
}
}
+ public void testAnnotation()
+ throws Exception
+ {
+ final Document schemaDocument = this.loadTestResourceDocument("xforms/unit-tests/automated/annotation-test.xsd");
+ Document xformsDocument = Schema2XFormsTest.buildXForm(null, schemaDocument, "annotation-test");
+ this.runXForm(xformsDocument);
+ System.err.println("generated xform " + XMLUtil.toString(xformsDocument));
+ Element control = assertControlProperties(xformsDocument,
+ "/annotation-test/upload_in_root",
+ NamespaceConstants.XFORMS_PREFIX + ":upload");
+ assertEquals("upload_in_root", control.getAttributeNS(NamespaceConstants.XFORMS_NS, "appearance"));
+ control = assertControlProperties(xformsDocument,
+ "/annotation-test/string_in_root",
+ NamespaceConstants.XFORMS_PREFIX + ":textarea");
+ assertEquals("string_in_root", control.getAttributeNS(NamespaceConstants.XFORMS_NS, "appearance"));
+
+ control = assertControlProperties(xformsDocument,
+ "/annotation-test/struct_1/upload_in_base",
+ NamespaceConstants.XFORMS_PREFIX + ":upload");
+ assertEquals("upload_in_base", control.getAttributeNS(NamespaceConstants.XFORMS_NS, "appearance"));
+ control = assertControlProperties(xformsDocument,
+ "/annotation-test/struct_1/string_in_base",
+ NamespaceConstants.XFORMS_PREFIX + ":textarea");
+ assertEquals("string_in_base", control.getAttributeNS(NamespaceConstants.XFORMS_NS, "appearance"));
+
+ control = assertControlProperties(xformsDocument,
+ "/annotation-test/struct_1/upload_in_struct",
+ NamespaceConstants.XFORMS_PREFIX + ":upload");
+ assertEquals("upload_in_struct", control.getAttributeNS(NamespaceConstants.XFORMS_NS, "appearance"));
+ control = assertControlProperties(xformsDocument,
+ "/annotation-test/struct_1/string_in_struct",
+ NamespaceConstants.XFORMS_PREFIX + ":textarea");
+ assertEquals("string_in_struct", control.getAttributeNS(NamespaceConstants.XFORMS_NS, "appearance"));
+ }
+
public void testConstraint()
throws Exception
{
diff --git a/source/java/org/alfresco/web/ui/common/Utils.java b/source/java/org/alfresco/web/ui/common/Utils.java
index 1153e784d1..b24bf2f3db 100644
--- a/source/java/org/alfresco/web/ui/common/Utils.java
+++ b/source/java/org/alfresco/web/ui/common/Utils.java
@@ -459,7 +459,7 @@ public final class Utils
{
try
{
- StringBuilder parsedContent = new StringBuilder();
+ StringBuilder parsedContent = new StringBuilder(str.length() + 32);
BufferedReader reader = new BufferedReader(new StringReader(str));
String line = reader.readLine();
while (line != null)
@@ -468,7 +468,7 @@ public final class Utils
line = reader.readLine();
if (line != null)
{
- parsedContent.append(" ");
+ parsedContent.append(" ");
}
}
diff --git a/source/test-resources/xforms/unit-tests/automated/annotation-test.xsd b/source/test-resources/xforms/unit-tests/automated/annotation-test.xsd
new file mode 100644
index 0000000000..12b95e35ae
--- /dev/null
+++ b/source/test-resources/xforms/unit-tests/automated/annotation-test.xsd
@@ -0,0 +1,42 @@
+
+
+
+
+
+ upload_in_base
+
+
+ string_in_base
+
+
+
+
+
+
+
+
+ upload_in_struct
+
+
+ string_in_struct
+
+
+
+
+
+
+
+
+
+ upload_in_root
+
+
+ string_in_root
+
+
+
+
+
+
diff --git a/source/web/WEB-INF/faces-config-beans.xml b/source/web/WEB-INF/faces-config-beans.xml
index c49f61b183..1962d69221 100644
--- a/source/web/WEB-INF/faces-config-beans.xml
+++ b/source/web/WEB-INF/faces-config-beans.xml
@@ -2601,6 +2601,10 @@
avmService
#{AVMLockingAwareService}
+
+ avmLockingService
+ #{AVMLockingService}
+
avmSyncService
#{AVMSyncService}
diff --git a/source/web/jsp/wcm/submit-dialog.jsp b/source/web/jsp/wcm/submit-dialog.jsp
index a86db9c088..dbabefd0f5 100644
--- a/source/web/jsp/wcm/submit-dialog.jsp
+++ b/source/web/jsp/wcm/submit-dialog.jsp
@@ -38,7 +38,7 @@
function pageLoaded()
{
- document.getElementById("dialog:dialog-body:comment").focus();
+ document.getElementById("dialog:dialog-body:label").focus();
noItems = document.getElementById("dialog:finish-button").disabled;
document.getElementById("dialog:finish-button").onclick = showProgress;
checkButtonState();
|