XPages Extension Library - onShow event for xe:djxmHeading
-
17-06-2021 - |
Question
I am trying to add an onShow event to a Mobile Page Heading as per p. 326 oF the XPages Extension Library book.
My code is as follows :-
<xe:djxmHeading id="djxmHeading1" back="All Areas" moveTo="byArea">
<xe:this.label><![CDATA[#{javascript:param.get("Rep")}]]></xe:this.label>
<xp:this.onShow>
<![CDATA[#{javascript:sessionScope.put("RepName", param.get("Rep"))}]]>
</xp:this.onShow>
</xe:djxmHeading>
which looks similar to the example in the book. But I'm getting the following error:
Unknown property this.onShow. It is not defined on tag xe:djxmHeading.
Any ideas what I'm doing wrong?
Thanks
Solution
hhmm, this may have been removed.
You can very easily achieve something similar with something like:
<xe:djxmHeading id="djxmHeading1" back="All Areas" moveTo="byArea">
<xe:this.label><![CDATA[#{javascript:
sessionScope.put("RepName", param.get("Rep"));
return param.get("Rep");
}]]></xe:this.label>
</xe:djxmHeading>
This will allow you to compute something before the heading is shown
OTHER TIPS
The onShow property was available in the beta but is not available in the version included with 8.5.3 Update Pack 1. The property is also not available in the public beta of 9.0. Simon's suggestion of an alternative is a good one.