Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
rbecher
MVP
MVP

Backend Api getSelections

Hi,

is there any method to get the current selections of the app?

- Ralf

Astrato.io Head of R&D
10 Replies
ErikWetterberg

Hi Ralf,

getList is actually not meant for use in extensions, though there might be situations when it is useful (like if you create stuff dynamically). Like Johan said, it will create a second GenericObject, but you are really after adding more stuff to the one you already have.

You do this in initialProperties, which are used to initialize your objects properties on creation. If you add a qSelectionObjectDef to your initialProperties you will get info about current selections in your layout. Something like this:

initialProperties : {

     qSelectionObjectDef:{ 

     },

     qHyperCubeDef:{

......

}

You can do this for all the list and combine it with qHyperCubeDef, qListObjectDef etc. The Toolbar extension example uses this to get lists of Fields and Bookmarks:

initialProperties : {

     version : 1.0,

     qBookmarkListDef : {

          qType : "bookmark",

          qData : {

               title : "/title",

               description : "/description"

          }

     },

     qFieldListDef: {}

}

Erik