cancel
Showing results for 
Search instead for 
Did you mean: 

How to: Dynamic ObjectHeader-Attributes

former_member603667
Participant
0 Kudos

Hi Team,

I'm new to sapui5 and I want to use any repeating container like a list in an ObjectHeader, in which I can display ObjectAttributes. Instead of adding them manually I want to display it dynamically, similarly to a List-Control, where you can set path for items. I tried several things, but did not succeed. I can't put a List in the attributes directly, as it is no aggregation of it. Can anyone help?

This is what's it now:

<ObjectHeader title="{temp>message}" responsive="true">
	<attributes>
		<ObjectAttribute title="..." text="{temp>objectGroup}"/>
		<ObjectAttribute title="..." text="{temp>object}"/>
		<ObjectAttribute title="..." text="{temp>eventDate}"/>
		<ObjectAttribute title="..." text="{temp>eventTime}"/>
		<ObjectAttribute title="..." text="{temp>message}"/>
		<ObjectAttribute title="..." text="{temp>date}"/>
	</attributes>
</ObjectHeader>

And this is what I want:

<ObjectHeader title="{temp>message}" responsive="true">
	<attributes>
            <ObjectAttribute title="{temp>key}" text="{temp>value}"/> <-- only one for all
	</attributes>
</ObjectHeader>

Best regards!

Accepted Solutions (1)

Accepted Solutions (1)

junwu
Active Contributor
<ObjectHeader title="{temp>message}" responsive="true" attributes={bind to collection}><ObjectAttribute title="{temp>key}" text="{temp>value}"/> <-- only one for all</ObjectHeader>

give it a try.

former_member603667
Participant
0 Kudos

Hi jun.wu5,

thank you very much for your help. I hoped that it would be that easy.

I concentrated very much on the api reference and it's aggregations and properties but this one is not listed. But compared with list and items it's very similar.

Best regards!

Answers (0)