<?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: how to print an error message when no application context is active? in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-print-an-error-message-when-no-application-context-is/m-p/321437#M8438</link>
    <description>&lt;P&gt;Hi Patco,&lt;/P&gt;
&lt;P&gt;The importer itself is launched via an Automation chain, triggered during the drag'n'drop:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;extension point="chains" target="org.nuxeo.ecm.core.operation.OperationServiceComponent"&amp;gt;
&amp;lt;chain id="FileManager.ImportWithMetaData"&amp;gt;
  &amp;lt;operation id="FileManager.Import"&amp;gt;
     &amp;lt;param name="overwite" type="boolean"&amp;gt;true&amp;lt;/param&amp;gt;
  &amp;lt;/operation&amp;gt;
  &amp;lt;operation id="Document.Update"&amp;gt;
    &amp;lt;param name="properties" type="properties"&amp;gt;expr:Context.get("docMetaData")&amp;lt;/param&amp;gt;
  &amp;lt;/operation&amp;gt;
&amp;lt;/chain&amp;gt;
&amp;lt;/extension&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;A href="http://org.nuxeo.ecm.core.automation.featuresContrib"&gt;(contributed here)&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;I guess the best thing to do would be to override this chain, to append a call to a "&lt;A href="http://explorer.nuxeo.org/nuxeo/site/distribution/Nuxeo%20Platform-5.7.1/viewOperation/Seam.AddInfoMessage"&gt;Seam.AddInfoMessage&lt;/A&gt;" or "&lt;A href="http://explorer.nuxeo.org/nuxeo/site/distribution/Nuxeo%20Platform-5.7.1/viewOperation/Seam.AddMessage"&gt;Seam.AddMessage&lt;/A&gt;" operation. If your message is complex (= template based) I think you'll have to create your own operation based on one of these, from which you can have full access to the Seam context.&lt;/P&gt;</description>
    <pubDate>Tue, 25 Jun 2013 18:11:23 GMT</pubDate>
    <dc:creator>Marwane_K_A_</dc:creator>
    <dc:date>2013-06-25T18:11:23Z</dc:date>
    <item>
      <title>how to print an error message when no application context is active?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-print-an-error-message-when-no-application-context-is/m-p/321436#M8437</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I cannot retrieve the application context when my file importer is launched through the drag and drop ... and thus cannot print my message through FacesMessages.&lt;/P&gt;
&lt;P&gt;What is the way to give some feedback to the user, then?&lt;/P&gt;
&lt;P&gt;Tx&lt;/P&gt;
&lt;P&gt;Patrick&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jun 2013 11:11:35 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-print-an-error-message-when-no-application-context-is/m-p/321436#M8437</guid>
      <dc:creator>patco_</dc:creator>
      <dc:date>2013-06-24T11:11:35Z</dc:date>
    </item>
    <item>
      <title>Re: how to print an error message when no application context is active?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-print-an-error-message-when-no-application-context-is/m-p/321437#M8438</link>
      <description>&lt;P&gt;Hi Patco,&lt;/P&gt;
&lt;P&gt;The importer itself is launched via an Automation chain, triggered during the drag'n'drop:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;extension point="chains" target="org.nuxeo.ecm.core.operation.OperationServiceComponent"&amp;gt;
&amp;lt;chain id="FileManager.ImportWithMetaData"&amp;gt;
  &amp;lt;operation id="FileManager.Import"&amp;gt;
     &amp;lt;param name="overwite" type="boolean"&amp;gt;true&amp;lt;/param&amp;gt;
  &amp;lt;/operation&amp;gt;
  &amp;lt;operation id="Document.Update"&amp;gt;
    &amp;lt;param name="properties" type="properties"&amp;gt;expr:Context.get("docMetaData")&amp;lt;/param&amp;gt;
  &amp;lt;/operation&amp;gt;
&amp;lt;/chain&amp;gt;
&amp;lt;/extension&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;A href="http://org.nuxeo.ecm.core.automation.featuresContrib"&gt;(contributed here)&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;I guess the best thing to do would be to override this chain, to append a call to a "&lt;A href="http://explorer.nuxeo.org/nuxeo/site/distribution/Nuxeo%20Platform-5.7.1/viewOperation/Seam.AddInfoMessage"&gt;Seam.AddInfoMessage&lt;/A&gt;" or "&lt;A href="http://explorer.nuxeo.org/nuxeo/site/distribution/Nuxeo%20Platform-5.7.1/viewOperation/Seam.AddMessage"&gt;Seam.AddMessage&lt;/A&gt;" operation. If your message is complex (= template based) I think you'll have to create your own operation based on one of these, from which you can have full access to the Seam context.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jun 2013 18:11:23 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-print-an-error-message-when-no-application-context-is/m-p/321437#M8438</guid>
      <dc:creator>Marwane_K_A_</dc:creator>
      <dc:date>2013-06-25T18:11:23Z</dc:date>
    </item>
  </channel>
</rss>

