08-17-2012 09:28 AM
Hello all,
May be my question has an obvious answer I did overlooked:
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.
Can I achieve this in XML using the Id of the Case? Or do I need code a custom widget for that?
Thanks in advance.
08-17-2012 10:39 AM
Hi,
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.
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.
08-17-2012 10:43 AM
Hi,
08-17-2012 10:55 AM
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...
08-17-2012 03:27 PM
thanks, that's exactly what I need. However, it doesn't seem to be working, got nothing displayed.
08-17-2012 03:28 PM
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?
08-20-2012 08:08 AM
if you're not acquainted with standard EL, reading standard doc is a start.
08-20-2012 12:31 PM
OK for the EL syntax, thanks.
08-20-2012 12:29 PM
Thanks Anahide for your support and the detailed answers. However, I still cannot make it work:
Here is my layout contrib:
<extension target="org.nuxeo.ecm.platform.forms.layout.WebLayoutManager" point="layouts">
<layout name="cm_inbox_caselink" override="true">
<templates>
<template mode="any">
/layouts/layout_listing_ajax_template.xhtml
</template>
</templates>
<properties mode="any">
<property name="showListingHeader">true</property>
<property name="showRowEvenOddClass">true</property>
</properties>
<columns>
<column>
<properties mode="any">
<property name="useFirstWidgetLabelAsColumnHeader">true</property>
</properties>
<widget>listing_reference</widget>
</column>
...
Here is the widget definition:
<widget name="listing_reference" type="text">
<labels>
<label mode="any">label.casemanagement.document.reference</label>
</labels>
<translated>true</translated>
<fields>
<field>data.cslk.caseDocumentId</field>
<field>#{docSuggestionActions.getDocumentWithId(data.cslk.caseDocumentId).case.reference}</field>
</fields>
</widget>
I put here both
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.
Please see what I'm doing wrong.
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.