cancel
Showing results for 
Search instead for 
Did you mean: 

Add a press event to the image in the ObjectPageHeader

Former Member
0 Kudos

Hi,

is it possible to add an event on the image in the ObjectPageHeader? Because I would like to show a Popover when I click on the image in the ObjectPageHeader, but I can't find any events for that.

Thanks in advance


Sebastian

Accepted Solutions (1)

Accepted Solutions (1)

sanjoy0308
Active Participant
0 Kudos

Hi Sebastian,

you can get image object like this

this.getView().getContent()[0].getHeaderTitle().mAggregations._objectImage

Regards,

Sanjoy

Former Member
0 Kudos

Hi Sanjoy,

it works almost. But the event only works on the small Picture (when you scroll down), not at the large picture that you see first 😕 Is there a way too, to add the Event on the large picture?

Here it works:

But not here:

Thanks and regards,

Sebastian

Answers (1)

Answers (1)

sanjoy0308
Active Participant
0 Kudos

Hi,

Please try this

oImage.attachBrowserEvent("mouseenter", function(){

}); 

Regards,

Sanjoy

Former Member
0 Kudos

Hi Sanjoy,

how I get the image-object from the ObjectPageHeader? Because, actually I only have the object from the ObjectPageHeader.

Code snippet:

View:


<uxap:ObjectPageLayout id="ObjectPageLayout" showTitleInHeaderContent="true">

        <uxap:headerTitle>

            <uxap:ObjectPageHeader id="header"

                                                              objectImageURI="sap-icon://person-placeholder"

                                                             objectTitle="title"

                                                             objectImageShape="Square"

                                                             objectSubtitle="subtitle">

            </uxap:ObjectPageHeader>

        </uxap:headerTitle>

      

        <uxap:headerContent>

[...]

</uxap:ObjectPageLayout>

Controller:


var head = this.byId('header');