on 01-09-2015 3:29 AM
Hi Experts.
I am doing a detail page. For the binding I executed the following
this.getView().bindElement("/DETAILSCollection(GUID='"+this.sMessageID+"',LANGUAGE='EN')?$expand=TEXT");
This call brings all the information related to a Message and also brings the different TEXTs linked to that message.
I can display the message info with no problem, but don't know how to display the Texts Info for and specific textID (TDID =A002 only).
Any one can help me out on the best approach..
<entry xmlns="http://www.w3.org/2005/Atom">
<id>http://test.com:8000/ZSERVICE/DETAILSCollection(GUID='5999',LANGUAGE='')</id>
<title type="text">DETAILSCollection(GUID='5999',LANGUAGE='')</title>
<updated>2015-01-08T21:38:00Z</updated>
<category term="ZSERVICE.DETAILS"/>
<link href="DETAILSCollection(GUID='5999',LANGUAGE='')/TEXT" title="TEXT">
<m:inline>
<feed xml:base="http://test.com:8000/ZSERVICE/">
<id>http://test.com:8000/ZSERVICE/DETAILSCollection(GUID='5999',LANGUAGE='')/TEXT</id>
<title type="text">TEXTCollection</title>
<updated>2015-01-08T21:38:00Z</updated>
<author><name/></author>
<link href="DETAILSCollection(GUID='5999',LANGUAGE='')/TEXT" rel="self" title="TEXTCollection"/>
<entry>
<id>http://test.com:8000/ZSERVICE/TEXTCollection('0001')</id>
<title type="text">TEXTCollection('0001')</title>
<updated>2015-01-08T21:38:00Z</updated>
<category term="ZSERVICE.TEXT"/>
<link href="TEXTCollection('0001')"/>
<link href="TEXTCollection('0001')/DETAILS" title="DETAILS"/>
<link href="TEXTCollection('0001')/$links/DETAILS"/>
<content type="application/xml">
<m:properties>
<d:TDID>0001</d:TDID>
<d:TDTEXT>SY-SYSID</d:TDTEXT>
<d:TDFUSER>JOHNDOE</d:TDFUSER>
<d:TDFCREATED_AT>20141212181509</d:TDFCREATED_AT>
</m:properties>
</content>
</entry>
<entry>
<id>http://test.com:8000/ZSERVICE/TEXTCollection('A002')</id>
<title type="text">TEXTCollection('A002')</title>
<updated>2015-01-08T21:38:00Z</updated>
<category term="ZSERVICE.TEXT" />
<link href="TEXTCollection('A002')"/>
<link href="TEXTCollection('A002')/DETAILS" title="DETAILS"/>
<link href="TEXTCollection('A002')/$links/DETAILS" title="DETAILS"/>
<content type="application/xml">
<m:properties>
<d:TDID>A002</d:TDID>
<d:TDTEXT>testing this again</d:TDTEXT>
<d:TDFUSER>JOHNDOE</d:TDFUSER>
<d:TDFCREATED_AT>20141212181509</d:TDFCREATED_AT>
</m:properties>
</content>
</entry>
</feed>
</m:inline>
</link>
<content type="application/xml">
<m:properties>
<d:GUID>5999</d:GUID>
<d:DESCRIPTION>test this</d:DESCRIPTION>
<d:CREATED_AT>20141212181512</d:CREATED_AT>
<d:CREATED_BY>JOHNDOE</d:CREATED_BY>
</m:properties>
</content>
</entry>
Maybe I didn't explain myself well. With this call
http://test.com:8000/ZSERVICE/DETAILSCollection(GUID='"+this.sMessageID+"',LANGUAGE='EN')?$expand=TEXT
I get all the properties related to a specific Message ID. and by executing it with the $EXPAND I get all the different TEXTs related to that Message ID.
Now when I try display the information on the detail page. I get all info related to the MEssage ID properties but don't get the properties related to the $EXPAND=TEXT
I am assuming that the the problem is because I have one Message ID but it can have more than one type of text assign to it. I tried to display the $Expand properties in a sap.m.list. But still no success.
<Page>
<ObjectHeader>
<attributes>
<ObjectAttribute title="Object ID" text="{OBJECT_ID}"/>
<ObjectAttribute title="Description" text="{DESCRIPTION}" />
<ObjectAttribute title="Created at" text="{CREATED_AT}"/>
</attributes>
</ObjectHeader>
<List id="lText">
<ObjectListItem id="oliText">
<attributes>
<ObjectAttribute text="{TEXT/TDTEXT}" />
</attributes>
</ObjectListItem>
</List>
</Page>
Rergards
Henry Lopez
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You'll have to do,
this.getView().bindElement("/DETAILSCollection(GUID='"+this.sMessageID+"',LANGUAGE='EN')", {expand:"TEXT"});
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.