mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
DM Forms - fix create web form from create/edit web project, fix edit DM form content
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@7403 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -34,6 +34,7 @@ import javax.faces.event.ActionEvent;
|
|||||||
|
|
||||||
import org.alfresco.model.ApplicationModel;
|
import org.alfresco.model.ApplicationModel;
|
||||||
import org.alfresco.model.ContentModel;
|
import org.alfresco.model.ContentModel;
|
||||||
|
import org.alfresco.model.WCMAppModel;
|
||||||
import org.alfresco.repo.content.MimetypeMap;
|
import org.alfresco.repo.content.MimetypeMap;
|
||||||
import org.alfresco.repo.transaction.RetryingTransactionHelper;
|
import org.alfresco.repo.transaction.RetryingTransactionHelper;
|
||||||
import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback;
|
import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback;
|
||||||
@@ -53,6 +54,7 @@ import org.alfresco.web.app.servlet.DownloadContentServlet;
|
|||||||
import org.alfresco.web.bean.dialog.BaseDialogBean;
|
import org.alfresco.web.bean.dialog.BaseDialogBean;
|
||||||
import org.alfresco.web.bean.repository.Node;
|
import org.alfresco.web.bean.repository.Node;
|
||||||
import org.alfresco.web.bean.repository.Repository;
|
import org.alfresco.web.bean.repository.Repository;
|
||||||
|
import org.alfresco.web.forms.FormNotFoundException;
|
||||||
import org.alfresco.web.ui.common.Utils;
|
import org.alfresco.web.ui.common.Utils;
|
||||||
import org.alfresco.web.ui.common.component.UIActionLink;
|
import org.alfresco.web.ui.common.component.UIActionLink;
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
@@ -282,8 +284,20 @@ public class CheckinCheckoutDialog extends BaseDialogBean
|
|||||||
boolean editingInline = false;
|
boolean editingInline = false;
|
||||||
Node node = setupContentDocument(id);
|
Node node = setupContentDocument(id);
|
||||||
|
|
||||||
|
if (node.hasAspect(WCMAppModel.ASPECT_FORM_INSTANCE_DATA))
|
||||||
|
{
|
||||||
|
editingInline = true;
|
||||||
|
|
||||||
|
// editable form document
|
||||||
|
FacesContext fc = FacesContext.getCurrentInstance();
|
||||||
|
this.navigator.setupDispatchContext(node);
|
||||||
|
|
||||||
|
// TODO - rename editContent Wizard since it only deals with editing form content
|
||||||
|
fc.getApplication().getNavigationHandler().handleNavigation(fc, null, "wizard:editContent");
|
||||||
|
}
|
||||||
|
|
||||||
// detect the inline editing aspect to see which edit mode to use
|
// detect the inline editing aspect to see which edit mode to use
|
||||||
if (node.hasAspect(ApplicationModel.ASPECT_INLINEEDITABLE) &&
|
else if (node.hasAspect(ApplicationModel.ASPECT_INLINEEDITABLE) &&
|
||||||
node.getProperties().get(ApplicationModel.PROP_EDITINLINE) != null &&
|
node.getProperties().get(ApplicationModel.PROP_EDITINLINE) != null &&
|
||||||
((Boolean)node.getProperties().get(ApplicationModel.PROP_EDITINLINE)).booleanValue() == true)
|
((Boolean)node.getProperties().get(ApplicationModel.PROP_EDITINLINE)).booleanValue() == true)
|
||||||
{
|
{
|
||||||
|
@@ -235,9 +235,17 @@ public class CreateFormWizard
|
|||||||
if (LOGGER.isDebugEnabled())
|
if (LOGGER.isDebugEnabled())
|
||||||
LOGGER.debug("creating form " + this.getFormName());
|
LOGGER.debug("creating form " + this.getFormName());
|
||||||
|
|
||||||
// get the node ref of the node that will contain the content (either Forms or Web Forms dictionary space)
|
// get the node ref of the node that will contain the content
|
||||||
final NodeRef contentFormsNodeRef = this.navigator.getCurrentNode().getNodeRef();
|
|
||||||
|
// TODO - need better way to determine WCM vs ECM context
|
||||||
|
// can create form from CreateWebProject Wizard, or from Forms DataDictionary space or Web Forms DataDictionary space
|
||||||
|
NodeRef contentFormsNodeRef = this.formsService.getWebContentFormsNodeRef();
|
||||||
|
if (this.navigator.getCurrentNode().getNodeRef().equals(this.formsService.getContentFormsNodeRef()))
|
||||||
|
{
|
||||||
|
// ECM form, store in Forms DataDictionary space
|
||||||
|
contentFormsNodeRef = this.formsService.getContentFormsNodeRef();
|
||||||
|
}
|
||||||
|
|
||||||
final FileInfo folderInfo =
|
final FileInfo folderInfo =
|
||||||
this.fileFolderService.create(contentFormsNodeRef,
|
this.fileFolderService.create(contentFormsNodeRef,
|
||||||
this.getFormName(),
|
this.getFormName(),
|
||||||
|
@@ -41,7 +41,7 @@
|
|||||||
</a:selectList>
|
</a:selectList>
|
||||||
<f:verbatim></div></f:verbatim>
|
<f:verbatim></div></f:verbatim>
|
||||||
</h:panelGroup>
|
</h:panelGroup>
|
||||||
<h:commandButton id="cmd-create" value="#{msg.create_form}" style="margin:2px" styleClass="dialogControls" action="wizard:createForm" />
|
<h:commandButton id="cmd-create" value="#{msg.create_web_form}" style="margin:2px" styleClass="dialogControls" action="wizard:createWebForm" />
|
||||||
|
|
||||||
<%-- Selected Form table, with configuration buttons and info text --%>
|
<%-- Selected Form table, with configuration buttons and info text --%>
|
||||||
<f:verbatim><div style='padding:4px'></div></f:verbatim>
|
<f:verbatim><div style='padding:4px'></div></f:verbatim>
|
||||||
|
Reference in New Issue
Block a user