cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

The community will undergo maintenance on October 16th at 10:00 PM PDT and will be unavailable for up to one hour.

Widget Development - Resolve Binding in Design Time

gbirnzain
10-Marble

Widget Development - Resolve Binding in Design Time

I would like to access the data from the infotable bound to my widget during design time (ide).

Are there any JS functions I can use? I saw there are some observers on the 'isBindingTarget':true properties but really would be thankful for some pointer in the right direction.

 

ACCEPTED SOLUTION

Accepted Solutions

Hello,

 

There are two key methods you could look into:

  • afterAddBindingSource is a method that you can implement in your widget object. It will be invoked by the platform whenever a binding source is added to any of your widget's infotable properties.

 

this.afterAddBindingSource = function (bindingInfo) {
    const propertyName = bindingInfo.targetProperty;
}

 

 

 

  • getInfotableMetadataForProperty is a method that is available as part of the widget API that you can invoke to retrieve the data shape fields of any infotable property that has an active binding. This is something you can invoke from afterAddBindingSource, but also at any other point in your IDE object:
    this.afterAddBindingSource = function (bindingInfo) {
        const propertyName = bindingInfo.targetProperty;
        const dataShape = this.getInfotableMetadataForProperty(propertyName);
    }​

Hope this helps.

View solution in original post

2 REPLIES 2

Hello,

 

There are two key methods you could look into:

  • afterAddBindingSource is a method that you can implement in your widget object. It will be invoked by the platform whenever a binding source is added to any of your widget's infotable properties.

 

this.afterAddBindingSource = function (bindingInfo) {
    const propertyName = bindingInfo.targetProperty;
}

 

 

 

  • getInfotableMetadataForProperty is a method that is available as part of the widget API that you can invoke to retrieve the data shape fields of any infotable property that has an active binding. This is something you can invoke from afterAddBindingSource, but also at any other point in your IDE object:
    this.afterAddBindingSource = function (bindingInfo) {
        const propertyName = bindingInfo.targetProperty;
        const dataShape = this.getInfotableMetadataForProperty(propertyName);
    }​

Hope this helps.

This is exactly what I was looking for.

Thanks!

Announcements


Top Tags