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

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

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.

 

1 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!

Top Tags