Search result : show for each line first node of list

Five Stars

Search result : show for each line first node of list

Hello,
In MDM web UI,
for an entity which have a complex-type,
we would like to show in the result list, for each line, an attribute of the first complex-type.
When we define the simple XPath <entity>/<complex-type>/<attribute>
we get a result list where one entity snow multiple occurence...
How to show only the value of an attribute of the first complex-type of the complex-type list ?
Regards
Employee

Re: Search result : show for each line first node of list

Hi Vianney,
If you have the following kind of document :
<entity>
<complexType>
<attribute>test</attribute>
<attribute>anotherTest</attribute>
</complexType>
</entity>

you can use this kind of XPath query :
/entity/complexType/attribute

PS : Beware of the loop you set if you're using a tMDMInput.
HTH,
Five Stars

Re: Search result : show for each line first node of list

Thank you for your reply
My question is about the web UI view.
I already tried the XPath you suggested (cf. screenshot)
But I get the following error
2014-04-11 09:28:59,883 ERROR ##### Error during fetch operation #####
2014-04-11 09:28:59,885 ERROR Unable to single search: : com.amalto.xmlserver.interfaces.XmlServerException: java.lang.RuntimeException: java.lang.RuntimeException: Exception occurred during fetch operation
com.amalto.xmlserver.interfaces.XmlServerException: java.lang.RuntimeException: java.lang.RuntimeException: Exception occurred during fetch operation
at com.amalto.core.delegator.IItemCtrlDelegator.viewSearch(IItemCtrlDelegator.java:274)
at com.amalto.core.ejb.ItemCtrl2Bean.viewSearch(ItemCtrl2Bean.java:420)
(...)
Caused by: org.apache.commons.lang.NotImplementedException: Code is not implemented
at com.amalto.core.query.user.VisitorAdapter.visit(VisitorAdapter.java:221)
at com.amalto.core.query.user.IndexedField.accept(IndexedField.java:34)
at com.amalto.core.storage.hibernate.SelectAnalyzer.visit(SelectAnalyzer.java:83)
(...)
Employee

Re: Search result : show for each line first node of list

Hi,
Looks like you've found a bug. Please report this on jira.talendforge.org (same credentials as forum for the login).