I wolud propose to create script with object launch point on Init and then filter inside of script events using methods from AppBean() ( UIContext.getCurrentContext().getWebClientSession().getCurrentApp() ) such as
getName()
onListTab()
and etc.
Also, add validations for nullPointers before method calling.
------------------------------
Andrey Ilinskiy
Handz.on
https://www.on.de/
München
------------------------------
Original Message:
Sent: Mon November 18, 2024 01:17 PM
From: Suhas Joshi
Subject: Need a common method at bean/mbo/mboset level
Thanks Bruno. I will try these options. Option 1 was clear but option 2 is still not clear. When you say script should be triggered only when attribute is displayed, do you mean we should display attribute conditionally?
------------------------------
Suhas Joshi
------------------------------
Original Message:
Sent: Sun November 17, 2024 07:37 AM
From: Bruno Portaluri
Subject: Need a common method at bean/mbo/mboset level
I'm thinking about two possible approaches.
- A custom event triggered by the tabchangeevent tag on the main tab of the application. Look here about the tabchangeevent tag and here about how to link that event to an automation script. Look here about how to trigger to automation script (the button is replaced by the tabchangeevent tag).
- Use a hidden non-persistent attribute on the main tab of the application and attach an automation script on the attribute "Initialize Value" event. Maximo should invoke the script only when the attribute is displayed (see here).
------------------------------
Bruno Portaluri
Maximo Principal Consultant
OMNINECS Europe
Rome
+393355784962