Support multiple lines in new post and post reply

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2026 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Gavin Cornwell
2005-12-12 16:08:26 +00:00
parent 7b8394f1f8
commit f7cfd9e5c9
2 changed files with 18 additions and 1 deletions

View File

@@ -22,6 +22,7 @@ import javax.faces.context.FacesContext;
import org.alfresco.model.ForumModel;
import org.alfresco.util.GUID;
import org.alfresco.web.bean.repository.Repository;
import org.alfresco.web.ui.common.Utils;
/**
* Backing bean for posting forum articles.
@@ -55,6 +56,9 @@ public class NewPostWizard extends CreateContentWizard
FacesContext.getCurrentInstance(), this.fileName);
this.title = this.fileName;
// remove link breaks and replace with <br/>
this.content = Utils.replaceLineBreaks(this.content);
return super.finish();
}

View File

@@ -20,6 +20,7 @@ package org.alfresco.web.bean.wizard;
import javax.faces.event.ActionEvent;
import org.alfresco.model.ContentModel;
import org.alfresco.web.ui.common.Utils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -45,6 +46,18 @@ public class NewReplyWizard extends NewPostWizard
this.browseBean.setupContentAction(event);
}
/**
* @see org.alfresco.web.bean.wizard.AbstractWizardBean#finish()
*/
@Override
public String finish()
{
// remove link breaks and replace with <br/>
this.content = Utils.replaceLineBreaks(this.content);
return super.finish();
}
/**
* @see org.alfresco.web.bean.wizard.BaseContentWizard#performCustomProcessing()
*/