cancel
Showing results for 
Search instead for 
Did you mean: 

how to print an error message when no application context is active?

patco_
Champ in-the-making
Champ in-the-making

Hi,

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.

What is the way to give some feedback to the user, then?

Tx

Patrick

1 REPLY 1

Marwane_K_A_
Star Contributor
Star Contributor

Hi Patco,

The importer itself is launched via an Automation chain, triggered during the drag'n'drop:

<extension point="chains" target="org.nuxeo.ecm.core.operation.OperationServiceComponent">
<chain id="FileManager.ImportWithMetaData">
  <operation id="FileManager.Import">
     <param name="overwite" type="boolean">true</param>
  </operation>
  <operation id="Document.Update">
    <param name="properties" type="properties">expr:Context.get("docMetaData")</param>
  </operation>
</chain>
</extension>

(contributed here)

I guess the best thing to do would be to override this chain, to append a call to a "Seam.AddInfoMessage" or "Seam.AddMessage" 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.

Getting started

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.