cancel
Showing results for 
Search instead for 
Did you mean: 

Select dialog fragment with values from different Odata nodes

laurent_touillaud
Contributor
0 Kudos
455

Hello,

I am facing a binding problem when refering to subnodes in a dialog fragment F4 help on input field.

The columns for firstname and lastname are empty... (see screenshot)

binding in dialog fragment:

<TableSelectDialog
noDataText="No Products Found"
title="Select UserID"
class="sapUiPopupWithPadding"
items="{path : '/USER_CREATESet'}"
search="_handleValueHelpSearch"
confirm="_handleValueHelpClose"
close="_handleValueHelpClose">
<ColumnListItem>
<cells>
<ObjectIdentifier
title="{Username}" />
<Text text="{/Address/Firstname}" />
<Text text="{Address/Lastname}" />
</cells>
</ColumnListItem>

The Username is found as it's at the root of the User "Set"

Subnode address connot be found in relative nor absolute path

I am using the below Odata service format :

<content type="application/xml">
<m:properties>
<d:Username>ALTOBELLIA</d:Username>

</m:properties>

</content>


Can i bind the subnode elements? or do i have to create a json model especially for this dialog fragment?


Thanks,

Laurent.


View Entire Topic
laurent_touillaud
Contributor
0 Kudos

I am still facing this issue.

Can anyone help?

junwu
Active Contributor
0 Kudos

are u sure this is your code?

<Text text="{/Address/Firstname}" />
<Text text="{Address/Lastname}" />
laurent_touillaud
Contributor
0 Kudos

Yes, i need to display the values in the two columns at thright from the username.

I tried to add these bindings also in the first column "title" but nothing is displayed.

It seems the substructure binding does not work in a normal view with table items neither...

junwu
Active Contributor
0 Kudos

one start with / one not?

laurent_touillaud
Contributor
0 Kudos

I just figured out the URI results are not the same when specifying the Set with or without a USER in the parameter.

hostname/sap/opu/odata/sap/ZGW_CREATE_USER_SRV/USER_CREATESet('ALTOBELLIA')?

This results in correct Address retrieval :

Now with following URI

hostname/sap/opu/odata/sap/ZGW_CREATE_USER_SRV/USER_CREATESet?


User is in the set of results but the Address structure is not filled...


The method GET_ENITITYSET was not getting address data whereas GET_ENTITY was ok.

Correction made and it is now ok with the initial bindings :

<ObjectIdentifier title="{Username}"/>
<Text text="{Address/Lastname}"/>
<Text text="{Address/Firstname}"/>


Best regards,