01-14-2014 07:28 AM
Hello,
I try to execute the "deleteActions" component from within a class extending "AbstractWork" like this :
return (DeleteActions) SeamComponentCallHelper.getSeamComponentByName("deleteActions");
But this throw the exception bellow :
java.lang.IllegalStateException: No application context active
at org.jboss.seam.Component.forName(Component.java:1902)
at org.nuxeo.ecm.platform.ui.web.util.SeamComponentCallHelper.getSeamComponentByName(SeamComponentCallHelper.java:73)
I try the code below to activate the application context, without success:
Contexts.getApplicationContext();
Is it the good way to call a seam component ?
Thank you.
01-14-2014 09:00 AM
Hi,
You should not try to use a Seam component outside of an active Seam context, as mentioned in the logs. An active Seam context could be: inside another Seam component (in which you could inject deleteActions with @In), in a facelet (XHTML) within an EL expression or in any place where EL expressions are allowed.
In your case you might want to directly use some API called by the Seam component, for instance TrashService
.
01-14-2014 09:00 AM
Hi,
You should not try to use a Seam component outside of an active Seam context, as mentioned in the logs. An active Seam context could be: inside another Seam component (in which you could inject deleteActions with @In), in a facelet (XHTML) within an EL expression or in any place where EL expressions are allowed.
In your case you might want to directly use some API called by the Seam component, for instance TrashService
.
01-24-2014 12:54 AM
TrashService works here.
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.