What You Can 'Get' from Open UI (Literally)

Despite of the openly misleading heading, we are going to discuss some official Siebel Open UI stuff. I get quite a lot of questions from students who are seeking documentation for 'all properties that I can use in Get()' or similar.

So what we are talking about today is the presentation model's Get method, the values (i.e. the names of properties) you can pass to it and what you get in return. If you have made your way into the Siebel Open UI JavaScript realm, you sure came across this method somewhere. Accessing the so-called properties is a mandatory step in most customizations. Otherwise you wouldn't be able to introspect the current data set or access the control objects within an applet and so forth.

Before we start, let me mention that this is officially documented in the Configuring Siebel Open UI guide in bookshelf (exactly here). So why do we engage in the seemingly futile exercise of repeating the documentation? Well, let's see:

Assorted Properties (properties you will probably need to "get", explained):

GetControls

This one is the salt of the earth ;-). Not much would be going on without the GetControls property. This is what you get:


What the PM returns when you tell it to go get the GetControls property is an object that contains one object for each control that is currently exposed (not necessarily visible) in the applet. With that you can usually find the control you want, invoke one of the various control object methods etc.

GetRecordSet

Another essential property is the current record set. Its value is actually an array of objects - one for each record that is currently displayed by the applet. Note that this is not the full query result set but only the records the applet displays. For a list applet in 'less' mode, it will be 10 records for example.

Record set for the Opportunity List Applet

Also noteworthy is the fact that the values (see above screenshot) are formatted as per the client locale (German in the screenshot).

GetRawRecordSet

If you need the raw data, try the GetRawRecordSet property.This one didn't make it into official documentation (yet) but is very useful because its data is unformatted and also includes controls not currently displayed (e.g. list columns not shown) and the Id field.

Raw record set for the Opportunity List Applet
GetFullId

Want to apply some (jQuery) magic to an entire applet? Simply use the GetFullId property to get the value of the id attribute of the applet container element. An example return value is "S_A1". Now it's easy to create a jQuery selector and work your magic...

GetPlaceholder

If you want to access child elements of the applet, the GetPlaceholder property is a good way to retrieve the string that uniquely identifies the 'placeholder'. An example value is "s_1_l" (last character is a lowercase 'L') and it appears many times as a sub-string. See this screenshot.


The screenshot is the DOM elements (partially) for the Opportunity List Applet. On top (in red boxes) you see the full Id used for the parent elements. Below you see the placeholder id (blue boxes) in child elements such as the column headers.

GetBusComp

Just in case you want to fool around with the applet's BC, the GetBusComp property holds a reference to the applet's business component instance.

GetMode

This is an easy one, holding the current applet mode such as "Edit List".

GetName

The GetName property holds the repository name of the applet, just in case you need it.

GetListOfColumns

This one only works on list applets and returns a similar object as the GetControls property, albeit it contains only the currently visible columns.

GetNumRows

This is the size of the current record set and NOT the record count!

GetSelection

The GetSelection property is the index number of the currently active record in a list applet. For example when the fourth record in a list is selected, the number would be 3.

GetRowsSelectedArray

For list applets, the GetRowsSelectedArray property holds a funny array that looks like this:

[false, false, true, true, false, false, false, false, false, false]

As you can see, the third and fourth value are "true" indicating that the user has multi-selected these records in the list applet.

Summary

Take a bit of time to inspect the properties available from a presentation model and you will find some great information, essential data and good time-savers.

have a nice day

@lex

תגובות

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

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