1

I have got an application layout with an image as banner. Is it possible to bind an event handler with an onclick event to the image in the banner?

    <xe:applicationLayout id="applicationLayout1"><xp:this.facets></xp:this.facets>
        <xp:callback facetName="facetMiddle" id="facetMiddle"></xp:callback>
        <xe:this.configuration>
            <xe:oneuiApplication productLogo="/ise_logo.png"
                productLogoHeight="70px" productLogoWidth="250px">
                <xe:this.bannerUtilityLinks>
                </xe:this.bannerUtilityLinks>
                <xe:this.titleBarTabs>
                </xe:this.titleBarTabs>
                <xe:this.footerLinks>
                </xe:this.footerLinks>
            </xe:oneuiApplication>
        </xe:this.configuration>
        </xe:applicationLayout>
PoisonedYouth
  • 548
  • 3
  • 16

1 Answers1

2

Add a class to your logo as Application Layout Banner's parameter with productLogoClass="applicationLogo".

enter image description here

Add then a client side onclick event for this class on client load with

    var applicationLogo= dojo.query('.applicationLogo')[0];
    applicationLogo.onclick = function() {
            alert('clicked on logo');
    } 

In client side event code you can execute a partial refresh with XSP.partialRefreshGet or XSP.partialRefreshPost like shown here.

Knut Herrmann
  • 30,880
  • 4
  • 31
  • 67