by fellow author Jan:
In a previous post we looked at how applets can be made collapsible by using the Default Applet Display Mode applet user property in Siebel Tools. In the following we look how we can use the same feature in a custom physical renderer (PR) without the need to change the repository (or SRF).
How ClientPMUserProp works
Let's investigate what happens when we add a value to the ClientPMUserProp applet user property:
First, Siebel passes all values that are in the list of the values of ClientPMUserProp to the client.
Next, the values are encapsulated in a property set of type apm which is read in the the Setup method of the Open UI proxy file pmodel.js and put into properties of the PM. As we can see the value of the user property Default Applet Display Mode is stored in the PM property defaultAppletDisplayMode.
Click to enlarge |
Click to enlarge |
With the knowledge gathered from the proxy code, we only have to set the PM property defaultAppletDisplayMode in our custom PM/PR to make an applet collapsible "on the fly". In my example I set it in the PR - one might argue that it should be set in the PM:
Click to enlarge |
As we set the property before the call of ShowUI no other change is required. If we set it after the call of ShowUI we can call this.GetPM().GetRenderer().ShowCollapseExpand() to inject it. Just be aware that you shouldn't call the method more than once as every call of ShowCollapseExpand adds a collapsing icon to the applet.
Please note that the above is undocumented.
Summary
By setting the defaultAppletDisplayMode PM property we can make an applet collapsible without the need to perform any change in Siebel Tools.
***
Thanks to Jan for this article
have a nice day
@lex
אין תגובות:
הוסף רשומת תגובה