Hi, Thanks for the ruleClass solution, it works fine.
As you say, for the moment I haven't any solution for contextual conditions in sub app. About the workbench I ignore my idea of a checkbox in a column. I'm thinking about another solution : having an action that can change a property. I have a workbench with an action named "Valider" (french for "Validate") [img]http://oi44.tinypic.com/24wvt41.jpg[/img] The Validation Column was "En attente" (french for "Waiting") and after the action it will be "Oui" (french for "Yes"). So I've created an Action like that : [code]public class ScientistsValidationAction extends AbstractAction<ScientistsValidationActionDefinition> { private final AbstractJcrNodeAdapter nodeItemToValidate; public ScientistsValidationAction(ScientistsValidationActionDefinition definition, AbstractJcrNodeAdapter nodeItemToValidate) { super(definition); this.nodeItemToValidate = nodeItemToValidate; } public void execute() throws ActionExecutionException { try { PropertyIterator it = this.nodeItemToValidate.getJcrItem().getProperties(); while(it.hasNext()){ Property p = it.nextProperty(); System.out.println(">>" + p.getName() + "=" + p.getString() + "<<"); } this.nodeItemToValidate.getJcrItem().setProperty("validationScientifique", "Oui"); System.out.println("---------------"); it = this.nodeItemToValidate.getJcrItem().getProperties(); while(it.hasNext()){ Property p = it.nextProperty(); System.out.println(">>" + p.getName() + "=" + p.getString() + "<<"); } } catch (Exception e) {} } }[/code] The console shows me that : [img]http://oi39.tinypic.com/nnkw03.jpg[/img] And the value has not changed on the workbench. I think I must write a line to "commit" the change, but I don't find an example. Please have you an idea ? Thanks. -- Context is everything: http://forum.magnolia-cms.com/forum/thread.html?threadId=54ef055b-b935-4a9b-b8ad-96b40920f058 You are invited to Magnolia Conference. Less than a month to go! Register now: http://www.magnolia-cms.com/conference/register.html ---------------------------------------------------------------- For list details, see http://www.magnolia-cms.com/community/mailing-lists.html Alternatively, use our forums: http://forum.magnolia-cms.com/ To unsubscribe, E-mail to: <[email protected]> ----------------------------------------------------------------
