xforms ui updates and fixes

- WCM-261:  only one active tinymce instance per page.  also extracted tinymce to what will soon be externally configurable parameters which enables different button configurations based on appearance.  having on instance per page does seem to provide a marginal performance boost
- WCM-453: better error message when creating content with a filename that already exists.
- WCM-431: providing tooltips on label based on a hint annotation
- test case for recursive schemas (haven't addressed the bug)
- fix for create web content for non form based content

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5603 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Ariel Backenroth
2007-05-02 21:56:36 +00:00
parent 3ca99c2ac1
commit 52950cfcfb
8 changed files with 217 additions and 119 deletions

View File

@@ -26,6 +26,7 @@ package org.alfresco.web.bean.wcm;
import java.io.ByteArrayInputStream;
import java.io.Serializable;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
@@ -48,6 +49,7 @@ import org.alfresco.repo.avm.AVMNodeConverter;
import org.alfresco.repo.avm.wf.AVMSubmittedAspect;
import org.alfresco.repo.content.MimetypeMap;
import org.alfresco.repo.workflow.WorkflowModel;
import org.alfresco.service.cmr.avm.AVMExistsException;
import org.alfresco.service.cmr.avm.AVMNodeDescriptor;
import org.alfresco.service.cmr.avm.AVMService;
import org.alfresco.service.cmr.avmsync.AVMDifference;
@@ -469,7 +471,7 @@ public class CreateWebContentWizard extends BaseContentWizard
final Form form = (MimetypeMap.MIMETYPE_XML.equals(this.mimeType)
? this.getForm()
: null);
String path = null;
String path = cwd;
if (form != null)
{
path = form.getOutputPathForFormInstanceData(this.instanceDataDocument,
@@ -491,9 +493,18 @@ public class CreateWebContentWizard extends BaseContentWizard
LOGGER.debug("creating file " + fileName + " in " + path);
// put the content of the file into the AVM store
avmService.createFile(path,
fileName,
new ByteArrayInputStream((this.content == null ? "" : this.content).getBytes("UTF-8")));
try
{
avmService.createFile(path,
fileName,
new ByteArrayInputStream((this.content == null ? "" : this.content).getBytes("UTF-8")));
}
catch (AVMExistsException avmee)
{
String msg = Application.getMessage(FacesContext.getCurrentInstance(), "error_exists");
msg = MessageFormat.format(msg, fileName);
throw new AlfrescoRuntimeException(msg, avmee);
}
// remember the created path
this.createdPath = AVMNodeConverter.ExtendAVMPath(path, fileName);