Skip to Content

How to: Dynamic ObjectHeader-Attributes

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!

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Jun 03, 2019 at 02:20 PM
    <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.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.