Morning merge.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@2812 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Britt Park
2006-05-10 14:46:54 +00:00
parent 7f6fabb0b6
commit 41976834d5
31 changed files with 799 additions and 195 deletions

View File

@@ -2,6 +2,7 @@ package org.alfresco.web.bean.content;
import java.io.File;
import java.text.MessageFormat;
import java.util.Map;
import javax.faces.context.FacesContext;
import javax.faces.event.ActionEvent;
@@ -9,6 +10,7 @@ import javax.faces.event.ActionEvent;
import org.alfresco.repo.content.MimetypeMap;
import org.alfresco.web.app.Application;
import org.alfresco.web.bean.FileUploadBean;
import org.alfresco.web.bean.repository.Node;
import org.alfresco.web.bean.repository.Repository;
/**
@@ -21,7 +23,7 @@ public class AddContentDialog extends BaseContentWizard
protected File file;
// ------------------------------------------------------------------------------
// Wizard implementation
// Dialog implementation
@Override
protected String finishImpl(FacesContext context, String outcome)
@@ -29,20 +31,49 @@ public class AddContentDialog extends BaseContentWizard
{
saveContent(this.file, null);
return "cancel";
// return default outcome
return outcome;
}
@Override
public void init()
public void init(Map<String, String> parameters)
{
super.init();
super.init(parameters);
clearUpload();
}
@Override
protected String doPostCommitProcessing(FacesContext context, String outcome)
{
// as we were successful, go to the set properties dialog if asked
// to otherwise just return
if (this.showOtherProperties)
{
// we are going to immediately edit the properties so we need
// to setup the BrowseBean context appropriately
this.browseBean.setDocument(new Node(this.createdNode));
return "dialog:setContentProperties";
}
else
{
return outcome;
}
}
@Override
protected String getDefaultFinishOutcome()
{
// as we are using this dialog outside the dialog framework
// just go back to the main page
return "browse";
}
// ------------------------------------------------------------------------------
// Bean getters and setters
/**
* @return Returns the message to display when a file has been uploaded
*/
@@ -111,7 +142,7 @@ public class AddContentDialog extends BaseContentWizard
// approach can not be used in the current dialog framework. Until
// we have a pure JSF upload solution we need this initialisation
init();
init(null);
}
/**