So ok I found.

I copy the class for other people that could have a similar problem.

[code]public class ScientistsValidationAction extends 
AbstractAction<ScientistsValidationActionDefinition> {

        private final AbstractJcrNodeAdapter nodeItemToValidate;
        
        private final EventBus eventBus;
        
        public ScientistsValidationAction(ScientistsValidationActionDefinition 
definition, AbstractJcrNodeAdapter nodeItemToValidate, 
@Named(AdmincentralEventBus.NAME) final EventBus eventBus) {
                super(definition);
                this.nodeItemToValidate = nodeItemToValidate;
                this.eventBus = eventBus;
        }
        
        public void execute() throws ActionExecutionException {
                try {
                        // We change the property
                        
this.nodeItemToValidate.getJcrItem().setProperty("validationScientifique", 
"Oui");
                        
                        // We save the JCR tree
                        
this.nodeItemToValidate.getJcrItem().getSession().save();
                        
                        // We refresh the workbench
                        this.eventBus.fireEvent(new 
ContentChangedEvent(this.nodeItemToValidate.getJcrItem().getSession().getWorkspace().getName(),
 this.nodeItemToValidate.getItemId()));
                        
                } catch (Exception e) {}
        }

}[/code]

Thanks for all !

-- 
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]>
----------------------------------------------------------------

Reply via email to