<?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 Display exception from an event listener aboutToCreate in webui Polymer in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/display-exception-from-an-event-listener-abouttocreate-in-webui/m-p/323099#M10100</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I would like to know how to catch an exception in the front with web-ui Polymer, in case of an event handler aboutToCreate for example.&lt;/P&gt;
&lt;P&gt;In my listener :&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;I rollback (it works)&lt;/LI&gt;
&lt;LI&gt;I add in contextData map a message, but this message does not display on the UI&lt;/LI&gt;
&lt;LI&gt;i throw the exception but the message does not display on the UI&lt;/LI&gt;
&lt;/UL&gt;
&lt;PRE&gt;&lt;CODE&gt;        DocumentEventContext ctx = (DocumentEventContext) event.getContext();
        DocumentModel doc = ctx.getSourceDocument();
        doc.getContextData().putAll(data);

    	TransactionHelper.setTransactionRollbackOnly();
    	event.markRollBack();
       throw new NuxeoException(e.getMessage(), e);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Thanks for any help&lt;/P&gt;</description>
    <pubDate>Mon, 18 Dec 2017 09:00:30 GMT</pubDate>
    <dc:creator>Yasir_</dc:creator>
    <dc:date>2017-12-18T09:00:30Z</dc:date>
    <item>
      <title>Display exception from an event listener aboutToCreate in webui Polymer</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/display-exception-from-an-event-listener-abouttocreate-in-webui/m-p/323099#M10100</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I would like to know how to catch an exception in the front with web-ui Polymer, in case of an event handler aboutToCreate for example.&lt;/P&gt;
&lt;P&gt;In my listener :&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;I rollback (it works)&lt;/LI&gt;
&lt;LI&gt;I add in contextData map a message, but this message does not display on the UI&lt;/LI&gt;
&lt;LI&gt;i throw the exception but the message does not display on the UI&lt;/LI&gt;
&lt;/UL&gt;
&lt;PRE&gt;&lt;CODE&gt;        DocumentEventContext ctx = (DocumentEventContext) event.getContext();
        DocumentModel doc = ctx.getSourceDocument();
        doc.getContextData().putAll(data);

    	TransactionHelper.setTransactionRollbackOnly();
    	event.markRollBack();
       throw new NuxeoException(e.getMessage(), e);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Thanks for any help&lt;/P&gt;</description>
      <pubDate>Mon, 18 Dec 2017 09:00:30 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/display-exception-from-an-event-listener-abouttocreate-in-webui/m-p/323099#M10100</guid>
      <dc:creator>Yasir_</dc:creator>
      <dc:date>2017-12-18T09:00:30Z</dc:date>
    </item>
  </channel>
</rss>

