- 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:
Gavin Cornwell
2006-05-10 08:54:14 +00:00
parent 7f6fabb0b6
commit c953c45c3d
26 changed files with 711 additions and 171 deletions

View File

@@ -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
*