mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
- New edit properties dialog used when new content is added/created
- Minor fixes/enhancements git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2805 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -46,31 +46,8 @@ public class EditRuleWizard extends CreateRuleWizard
|
||||
{
|
||||
private static final Log logger = LogFactory.getLog(EditRuleWizard.class);
|
||||
|
||||
@Override
|
||||
protected String finishImpl(FacesContext context, String outcome) throws Exception
|
||||
{
|
||||
// get hold of the space the rule will apply to and make sure
|
||||
// it is actionable
|
||||
Node currentSpace = browseBean.getActionSpace();
|
||||
|
||||
// get the existing rule
|
||||
Rule rule = this.rulesBean.getCurrentRule();
|
||||
|
||||
// remove all the conditions and actions from the current rule
|
||||
rule.removeAllActionConditions();
|
||||
rule.removeAllActions();
|
||||
|
||||
// re-setup the rule
|
||||
outcome = setupRule(context, rule, outcome);
|
||||
|
||||
// Save the rule
|
||||
this.ruleService.saveRule(currentSpace.getNodeRef(), rule);
|
||||
|
||||
if (logger.isDebugEnabled())
|
||||
logger.debug("Updated rule '" + this.title + "'");
|
||||
|
||||
return outcome;
|
||||
}
|
||||
// ------------------------------------------------------------------------------
|
||||
// Wizard implementation
|
||||
|
||||
@Override
|
||||
public void init()
|
||||
@@ -133,6 +110,35 @@ public class EditRuleWizard extends CreateRuleWizard
|
||||
this.action = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String finishImpl(FacesContext context, String outcome) throws Exception
|
||||
{
|
||||
// get hold of the space the rule will apply to and make sure
|
||||
// it is actionable
|
||||
Node currentSpace = browseBean.getActionSpace();
|
||||
|
||||
// get the existing rule
|
||||
Rule rule = this.rulesBean.getCurrentRule();
|
||||
|
||||
// remove all the conditions and actions from the current rule
|
||||
rule.removeAllActionConditions();
|
||||
rule.removeAllActions();
|
||||
|
||||
// re-setup the rule
|
||||
outcome = setupRule(context, rule, outcome);
|
||||
|
||||
// Save the rule
|
||||
this.ruleService.saveRule(currentSpace.getNodeRef(), rule);
|
||||
|
||||
if (logger.isDebugEnabled())
|
||||
logger.debug("Updated rule '" + this.title + "'");
|
||||
|
||||
return outcome;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------
|
||||
// Helper methods
|
||||
|
||||
/**
|
||||
* Populates a Map of properties the wizard is expecting for the given condition
|
||||
*
|
||||
|
Reference in New Issue
Block a user