adding support for wcm tinymce extensions to create html from web content wizard

- extracted file picker backing code into its own bean
- refactoring for to extract file picker bean
- refactoring to manage uploads from file picker outside of xforms context
- added some language utility methods to common.js
- refactored extension dialogs to deal with quirkyness of tinymce dialog codebase on IE - mostly works now and addressed bug WCM-471
- resourcifying a couple strings i missed in filepickerbean

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5675 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Ariel Backenroth
2007-05-14 22:03:10 +00:00
parent bd54cd2401
commit df32d0ddf1
18 changed files with 615 additions and 411 deletions

View File

@@ -118,6 +118,9 @@ public class CreateWebContentWizard extends BaseContentWizard
/** Workflow service bean reference */
protected WorkflowService workflowService;
/** The FilePickerBean reference */
protected FilePickerBean filePickerBean;
/**
* @param avmService The AVMService to set.
@@ -159,6 +162,14 @@ public class CreateWebContentWizard extends BaseContentWizard
{
this.avmBrowseBean = avmBrowseBean;
}
/**
* @param filePickerBean The FilePickerBean to set.
*/
public void setFilePickerBean(final FilePickerBean filePickerBean)
{
this.filePickerBean = filePickerBean;
}
// ------------------------------------------------------------------------------
@@ -185,7 +196,8 @@ public class CreateWebContentWizard extends BaseContentWizard
this.formSelectDisabled = false;
this.createMimeTypes = null;
this.formChoices = null;
this.filePickerBean.clearUploadedFiles();
// check for a form ID being passed in as a parameter
if (this.parameters.get(UIUserSandboxes.PARAM_FORM_NAME) != null)
{
@@ -279,9 +291,7 @@ public class CreateWebContentWizard extends BaseContentWizard
protected String finishImpl(final FacesContext context, final String outcome)
throws Exception
{
final NodeRef[] uploadedFiles = (this.formProcessorSession != null
? this.formProcessorSession.getUploadedFiles()
: new NodeRef[0]);
final NodeRef[] uploadedFiles = this.filePickerBean.getUploadedFiles();
final List<AVMDifference> diffList =
new ArrayList<AVMDifference>(1 + this.renditions.size() + uploadedFiles.length);
diffList.add(new AVMDifference(-1, this.createdPath,
@@ -415,6 +425,7 @@ public class CreateWebContentWizard extends BaseContentWizard
{
this.formProcessorSession.destroy();
}
this.filePickerBean.clearUploadedFiles();
// return the default outcome
return outcome;
@@ -741,7 +752,7 @@ public class CreateWebContentWizard extends BaseContentWizard
return Collections.EMPTY_LIST;
}
NodeRef[] uploadedFiles = this.formProcessorSession.getUploadedFiles();
final NodeRef[] uploadedFiles = this.filePickerBean.getUploadedFiles();
final List<UIListItem> result =
new ArrayList<UIListItem>(uploadedFiles.length);