<?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: Widgets: How to retrieve a property on a pointed object? in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/widgets-how-to-retrieve-a-property-on-a-pointed-object/m-p/321789#M8790</link>
    <description>&lt;P&gt;On second thought, it would be wiser to define a widget template anyway, so that you can handle use cases where target document is not found, undefined, etc...&lt;/P&gt;</description>
    <pubDate>Fri, 17 Aug 2012 14:55:44 GMT</pubDate>
    <dc:creator>Anahide_Tchertc</dc:creator>
    <dc:date>2012-08-17T14:55:44Z</dc:date>
    <item>
      <title>Widgets: How to retrieve a property on a pointed object?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/widgets-how-to-retrieve-a-property-on-a-pointed-object/m-p/321786#M8787</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;
&lt;P&gt;May be my question has an obvious answer I did overlooked:&lt;/P&gt;
&lt;P&gt;In Case Management model CaseLink object points the owner Case document by storing it's Id (caseDocumentId attribute).
In the listing widget of case links in Inbox mailbox, I'd like to retrieve and display a property coming from the owner Case.&lt;/P&gt;
&lt;P&gt;Can I achieve this in XML using the Id of the Case? Or do I need code a custom widget for that?&lt;/P&gt;
&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Aug 2012 13:28:40 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/widgets-how-to-retrieve-a-property-on-a-pointed-object/m-p/321786#M8787</guid>
      <dc:creator>promanov_</dc:creator>
      <dc:date>2012-08-17T13:28:40Z</dc:date>
    </item>
    <item>
      <title>Re: Widgets: How to retrieve a property on a pointed object?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/widgets-how-to-retrieve-a-property-on-a-pointed-object/m-p/321787#M8788</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;You'll need some logic to retrieve the document from its id (taking example on the document suggestion widget templates for instance) and then you'll be able to retrieve the property.&lt;/P&gt;
&lt;P&gt;From 5.6, it's possible to use EL expressions in "field" XML elements, so the answer is yes. If you're using a lower version, you'll probably have to use a custom widget template.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Aug 2012 14:39:30 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/widgets-how-to-retrieve-a-property-on-a-pointed-object/m-p/321787#M8788</guid>
      <dc:creator>Anahide_Tchertc</dc:creator>
      <dc:date>2012-08-17T14:39:30Z</dc:date>
    </item>
    <item>
      <title>Re: Widgets: How to retrieve a property on a pointed object?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/widgets-how-to-retrieve-a-property-on-a-pointed-object/m-p/321788#M8789</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;</description>
      <pubDate>Fri, 17 Aug 2012 14:43:43 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/widgets-how-to-retrieve-a-property-on-a-pointed-object/m-p/321788#M8789</guid>
      <dc:creator>promanov_</dc:creator>
      <dc:date>2012-08-17T14:43:43Z</dc:date>
    </item>
    <item>
      <title>Re: Widgets: How to retrieve a property on a pointed object?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/widgets-how-to-retrieve-a-property-on-a-pointed-object/m-p/321789#M8790</link>
      <description>&lt;P&gt;On second thought, it would be wiser to define a widget template anyway, so that you can handle use cases where target document is not found, undefined, etc...&lt;/P&gt;</description>
      <pubDate>Fri, 17 Aug 2012 14:55:44 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/widgets-how-to-retrieve-a-property-on-a-pointed-object/m-p/321789#M8790</guid>
      <dc:creator>Anahide_Tchertc</dc:creator>
      <dc:date>2012-08-17T14:55:44Z</dc:date>
    </item>
    <item>
      <title>Re: Widgets: How to retrieve a property on a pointed object?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/widgets-how-to-retrieve-a-property-on-a-pointed-object/m-p/321790#M8791</link>
      <description>&lt;P&gt;thanks, that's exactly what I need. However, it doesn't seem to be working, got nothing displayed.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Aug 2012 19:27:33 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/widgets-how-to-retrieve-a-property-on-a-pointed-object/m-p/321790#M8791</guid>
      <dc:creator>promanov_</dc:creator>
      <dc:date>2012-08-17T19:27:33Z</dc:date>
    </item>
    <item>
      <title>Re: Widgets: How to retrieve a property on a pointed object?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/widgets-how-to-retrieve-a-property-on-a-pointed-object/m-p/321791#M8792</link>
      <description>&lt;P&gt;how can I learn moe about the syntax of EL expressions? haven't found much in the Nuxeo EP doc. Is that the part you are still to add?&lt;/P&gt;</description>
      <pubDate>Fri, 17 Aug 2012 19:28:52 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/widgets-how-to-retrieve-a-property-on-a-pointed-object/m-p/321791#M8792</guid>
      <dc:creator>promanov_</dc:creator>
      <dc:date>2012-08-17T19:28:52Z</dc:date>
    </item>
    <item>
      <title>Re: Widgets: How to retrieve a property on a pointed object?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/widgets-how-to-retrieve-a-property-on-a-pointed-object/m-p/321792#M8793</link>
      <description>&lt;P&gt;if you're not acquainted with standard EL, reading standard doc is a start.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Aug 2012 12:08:55 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/widgets-how-to-retrieve-a-property-on-a-pointed-object/m-p/321792#M8793</guid>
      <dc:creator>Anahide_Tchertc</dc:creator>
      <dc:date>2012-08-20T12:08:55Z</dc:date>
    </item>
    <item>
      <title>Re: Widgets: How to retrieve a property on a pointed object?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/widgets-how-to-retrieve-a-property-on-a-pointed-object/m-p/321793#M8794</link>
      <description>&lt;P&gt;Thanks Anahide for your support and the detailed answers.
However, I still cannot make it work:&lt;/P&gt;
&lt;P&gt;Here is my layout contrib:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;  &amp;lt;extension target="org.nuxeo.ecm.platform.forms.layout.WebLayoutManager" point="layouts"&amp;gt;
    &amp;lt;layout name="cm_inbox_caselink" override="true"&amp;gt;
      &amp;lt;templates&amp;gt;
        &amp;lt;template mode="any"&amp;gt;
          /layouts/layout_listing_ajax_template.xhtml
        &amp;lt;/template&amp;gt;
      &amp;lt;/templates&amp;gt;
      &amp;lt;properties mode="any"&amp;gt;
        &amp;lt;property name="showListingHeader"&amp;gt;true&amp;lt;/property&amp;gt;
        &amp;lt;property name="showRowEvenOddClass"&amp;gt;true&amp;lt;/property&amp;gt;
      &amp;lt;/properties&amp;gt;
      &amp;lt;columns&amp;gt;
        &amp;lt;column&amp;gt;
          &amp;lt;properties mode="any"&amp;gt;
            &amp;lt;property name="useFirstWidgetLabelAsColumnHeader"&amp;gt;true&amp;lt;/property&amp;gt;
          &amp;lt;/properties&amp;gt;
          &amp;lt;widget&amp;gt;listing_reference&amp;lt;/widget&amp;gt;
        &amp;lt;/column&amp;gt;
    ...
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Here is the widget definition:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;widget name="listing_reference" type="text"&amp;gt;
	      &amp;lt;labels&amp;gt;
	        &amp;lt;label mode="any"&amp;gt;label.casemanagement.document.reference&amp;lt;/label&amp;gt;
	      &amp;lt;/labels&amp;gt;
	      &amp;lt;translated&amp;gt;true&amp;lt;/translated&amp;gt;
	      &amp;lt;fields&amp;gt; 
	        &amp;lt;field&amp;gt;data.cslk.caseDocumentId&amp;lt;/field&amp;gt; 
	        &amp;lt;field&amp;gt;#{docSuggestionActions.getDocumentWithId(data.cslk.caseDocumentId).case.reference}&amp;lt;/field&amp;gt;
	      &amp;lt;/fields&amp;gt;
	    &amp;lt;/widget&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I put here both &lt;FIELD&gt; elements: the first works and the second doesn't.
"layoutValue" from your example ddn't work, "data" instead works fine on the simple first &lt;FIELD&gt; binding.&lt;/FIELD&gt;&lt;/FIELD&gt;&lt;/P&gt;
&lt;P&gt;case.reference is a new property I've added overriding case schema, but I've also tested with dc.title, no difference. I've made a handful of tests, tested to retrieve the pointed CaseItem object instead of Case etc..
There is no error / java exception raised but the result is empty.&lt;/P&gt;
&lt;P&gt;Please see what I'm doing wrong.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Aug 2012 16:29:15 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/widgets-how-to-retrieve-a-property-on-a-pointed-object/m-p/321793#M8794</guid>
      <dc:creator>promanov_</dc:creator>
      <dc:date>2012-08-20T16:29:15Z</dc:date>
    </item>
    <item>
      <title>Re: Widgets: How to retrieve a property on a pointed object?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/widgets-how-to-retrieve-a-property-on-a-pointed-object/m-p/321794#M8795</link>
      <description>&lt;P&gt;OK for the EL syntax, thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Aug 2012 16:31:48 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/widgets-how-to-retrieve-a-property-on-a-pointed-object/m-p/321794#M8795</guid>
      <dc:creator>promanov_</dc:creator>
      <dc:date>2012-08-20T16:31:48Z</dc:date>
    </item>
  </channel>
</rss>

