mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
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:
@@ -22,6 +22,7 @@ import javax.faces.context.FacesContext;
|
|||||||
import org.alfresco.model.ForumModel;
|
import org.alfresco.model.ForumModel;
|
||||||
import org.alfresco.util.GUID;
|
import org.alfresco.util.GUID;
|
||||||
import org.alfresco.web.bean.repository.Repository;
|
import org.alfresco.web.bean.repository.Repository;
|
||||||
|
import org.alfresco.web.ui.common.Utils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Backing bean for posting forum articles.
|
* Backing bean for posting forum articles.
|
||||||
@@ -55,6 +56,9 @@ public class NewPostWizard extends CreateContentWizard
|
|||||||
FacesContext.getCurrentInstance(), this.fileName);
|
FacesContext.getCurrentInstance(), this.fileName);
|
||||||
this.title = this.fileName;
|
this.title = this.fileName;
|
||||||
|
|
||||||
|
// remove link breaks and replace with <br/>
|
||||||
|
this.content = Utils.replaceLineBreaks(this.content);
|
||||||
|
|
||||||
return super.finish();
|
return super.finish();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -20,6 +20,7 @@ package org.alfresco.web.bean.wizard;
|
|||||||
import javax.faces.event.ActionEvent;
|
import javax.faces.event.ActionEvent;
|
||||||
|
|
||||||
import org.alfresco.model.ContentModel;
|
import org.alfresco.model.ContentModel;
|
||||||
|
import org.alfresco.web.ui.common.Utils;
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
|
|
||||||
@@ -44,7 +45,19 @@ public class NewReplyWizard extends NewPostWizard
|
|||||||
// also setup the content in the browse bean
|
// also setup the content in the browse bean
|
||||||
this.browseBean.setupContentAction(event);
|
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()
|
* @see org.alfresco.web.bean.wizard.BaseContentWizard#performCustomProcessing()
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user