Siebel Open UI: Collapsible Applets - Another Revisit

By Jan Peterson

During a presentation to the technical team of a customer who is in the progress of updating to Open UI, I showed how easy it is to make all applets collapsible by just adding some code to a postload event handler.
We have looked at the general concepts in an earlier post:
postload.js

I quickly received a follow up question if it is possible to collapse applets automatically in case the applet doesn't have any records. As often in the new world of Open UI, the solution is very easy.

Replacing

oAppletPModel.SetProperty("defaultAppletDisplayMode", collapsed");

with

oAppletPModel.SetProperty("defaultAppletDisplayMode",
oAppletPModel.Get("GetNumRows") > 0) ? "expanded" : "collapsed");

does the job :-).

A few notes:
  • In the example I updated postload.js. For a production environment it is recommended to have a custom file that subscribes to the postload event..
  •  The postload event is only triggered if a user navigates to a new view or reloads the current view. If a child applet has no records and the user selects a different parent record which has some records in the child applet, the applet doesn't get automatically expanded. This can be achieved as well but requires some additional logic.
  • Not all applets support the "Default Applet Display Mode" user property. An example are most applets on the vanilla home views.
In summary, IP2013 makes it easy to make all applets collapsible and allows to add some additional logic around it.

תגובות

פוסטים פופולריים מהבלוג הזה

Profile Attributes and Open UI

SBL-BPR-00191: The rowId of the active row of the primary buscomp '%1', '%2', does not match the Primary Id

SBL-SVC-00150