<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Execute a Seam component in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/execute-a-seam-component/m-p/316160#M3161</link>
    <description>&lt;P&gt;TrashService works here.&lt;/P&gt;</description>
    <pubDate>Fri, 24 Jan 2014 05:54:33 GMT</pubDate>
    <dc:creator>zyx974_</dc:creator>
    <dc:date>2014-01-24T05:54:33Z</dc:date>
    <item>
      <title>Execute a Seam component</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/execute-a-seam-component/m-p/316158#M3159</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I try to execute the "deleteActions" component from within a class extending "AbstractWork" like this :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;return (DeleteActions) SeamComponentCallHelper.getSeamComponentByName("deleteActions");
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But this throw the exception bellow :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;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)
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I try the code below to activate the application context, without success:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;Contexts.getApplicationContext();
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Is it the good way to call a seam component ?&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jan 2014 12:28:17 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/execute-a-seam-component/m-p/316158#M3159</guid>
      <dc:creator>zyx974_</dc:creator>
      <dc:date>2014-01-14T12:28:17Z</dc:date>
    </item>
    <item>
      <title>Re: Execute a Seam component</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/execute-a-seam-component/m-p/316159#M3160</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;In your case you might want to directly use some API called by the Seam component, for instance &lt;CODE&gt;TrashService&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jan 2014 14:00:02 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/execute-a-seam-component/m-p/316159#M3160</guid>
      <dc:creator>ataillefer_</dc:creator>
      <dc:date>2014-01-14T14:00:02Z</dc:date>
    </item>
    <item>
      <title>Re: Execute a Seam component</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/execute-a-seam-component/m-p/316160#M3161</link>
      <description>&lt;P&gt;TrashService works here.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jan 2014 05:54:33 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/execute-a-seam-component/m-p/316160#M3161</guid>
      <dc:creator>zyx974_</dc:creator>
      <dc:date>2014-01-24T05:54:33Z</dc:date>
    </item>
  </channel>
</rss>

