Howto get OpenUI5 Binding Information











up vote
0
down vote

favorite












I need to figure out what objects within a OpenUi5 JSONModel are bound to at least one UI component.



I want to check what objects are bound of the model and then get only new values of the bound objects from an embedded device. With other words I do not want to get all available information of a embedded device via web request if some of them are currently not visible / bound on the Ui.



Does anybody have an idea how I could figure this out using javascript.



I already saw that the JSONModel has a property called aBindings that lists all current UiBindings, but I wonder if this is the right way to get that information.



Thanks!










share|improve this question






















  • Are you intending to do this "live" based on the current bindings of the model, or are you trying to figure out an efficient way to analyse an existing app?
    – Jorg
    Nov 20 at 22:17










  • Hi Jorg, I want to poll in the background of the app the required data from an embedded device via http requests. But I do not want to read all data from the device but only that information that is bound within the Ui.
    – Mortimer76
    Nov 21 at 15:10















up vote
0
down vote

favorite












I need to figure out what objects within a OpenUi5 JSONModel are bound to at least one UI component.



I want to check what objects are bound of the model and then get only new values of the bound objects from an embedded device. With other words I do not want to get all available information of a embedded device via web request if some of them are currently not visible / bound on the Ui.



Does anybody have an idea how I could figure this out using javascript.



I already saw that the JSONModel has a property called aBindings that lists all current UiBindings, but I wonder if this is the right way to get that information.



Thanks!










share|improve this question






















  • Are you intending to do this "live" based on the current bindings of the model, or are you trying to figure out an efficient way to analyse an existing app?
    – Jorg
    Nov 20 at 22:17










  • Hi Jorg, I want to poll in the background of the app the required data from an embedded device via http requests. But I do not want to read all data from the device but only that information that is bound within the Ui.
    – Mortimer76
    Nov 21 at 15:10













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I need to figure out what objects within a OpenUi5 JSONModel are bound to at least one UI component.



I want to check what objects are bound of the model and then get only new values of the bound objects from an embedded device. With other words I do not want to get all available information of a embedded device via web request if some of them are currently not visible / bound on the Ui.



Does anybody have an idea how I could figure this out using javascript.



I already saw that the JSONModel has a property called aBindings that lists all current UiBindings, but I wonder if this is the right way to get that information.



Thanks!










share|improve this question













I need to figure out what objects within a OpenUi5 JSONModel are bound to at least one UI component.



I want to check what objects are bound of the model and then get only new values of the bound objects from an embedded device. With other words I do not want to get all available information of a embedded device via web request if some of them are currently not visible / bound on the Ui.



Does anybody have an idea how I could figure this out using javascript.



I already saw that the JSONModel has a property called aBindings that lists all current UiBindings, but I wonder if this is the right way to get that information.



Thanks!







javascript sapui5






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 20 at 16:04









Mortimer76

11




11












  • Are you intending to do this "live" based on the current bindings of the model, or are you trying to figure out an efficient way to analyse an existing app?
    – Jorg
    Nov 20 at 22:17










  • Hi Jorg, I want to poll in the background of the app the required data from an embedded device via http requests. But I do not want to read all data from the device but only that information that is bound within the Ui.
    – Mortimer76
    Nov 21 at 15:10


















  • Are you intending to do this "live" based on the current bindings of the model, or are you trying to figure out an efficient way to analyse an existing app?
    – Jorg
    Nov 20 at 22:17










  • Hi Jorg, I want to poll in the background of the app the required data from an embedded device via http requests. But I do not want to read all data from the device but only that information that is bound within the Ui.
    – Mortimer76
    Nov 21 at 15:10
















Are you intending to do this "live" based on the current bindings of the model, or are you trying to figure out an efficient way to analyse an existing app?
– Jorg
Nov 20 at 22:17




Are you intending to do this "live" based on the current bindings of the model, or are you trying to figure out an efficient way to analyse an existing app?
– Jorg
Nov 20 at 22:17












Hi Jorg, I want to poll in the background of the app the required data from an embedded device via http requests. But I do not want to read all data from the device but only that information that is bound within the Ui.
– Mortimer76
Nov 21 at 15:10




Hi Jorg, I want to poll in the background of the app the required data from an embedded device via http requests. But I do not want to read all data from the device but only that information that is bound within the Ui.
– Mortimer76
Nov 21 at 15:10












1 Answer
1






active

oldest

votes

















up vote
1
down vote













It looks like this is your first question here, so welcome to StackOverflow!



Although it is expected that you already try out the code for which you seem to have issues and then post it here with the errors or expected results, I will still try to help you out.



To get answers to your question, I would suggest you to read through the Data Binding section under Get Started: Setup and Tutorials of the SAPUI5 Demokit. This includes,




  • Creating a model

  • Property binding

  • Binding paths and formatting values


Once you get the basics right, you will see that with the concept of Two-way Binding, the model is already updated with the new values that you are looking for, if it's changed in the UI and vice-versa.



Also, if you are looking for a particular object or property, you can directly query the model instead of worrying about to which control it is binded.



For example this.getView().getModel("myModel").getProperty("/view/visible") will return the current value of the property "visible" regardless of which control it is binded to.



If my answer totally misses your question, please elaborate on your concerns and we can explore it further.






share|improve this answer





















  • Hi, thanks for your support. I read and so far understood the data binding part of the tutorials. Binding to a JSON model also works fine. The objects within my model represent current values of a connected embedded device, e.g. the current temperature of the device. Now I only want to poll those current values of the embedded device where the corresponding object within the JSON model is bound to a Ui component as the bandwidth to my embedded device is quite limited and I cannot update all the values every second.
    – Mortimer76
    Nov 21 at 7:51












  • So I wonder if there is something like this.getView().getModel("myModel").getBindings() to figure out which objects are bound within the Ui and therefore I have to ask the embedded device for the current values. Example: If the current temperature is bound within the Ui and the current pressure not, then I will poll only the current temperature from the device every second and not the current pressure.
    – Mortimer76
    Nov 21 at 8:02










  • @Mortimer76 if you have a UI element with a property that is bound to your Model then instead of asking the UI element for the bindings it always easier to get the Model property that is bound to that element by using this.getView().getModel("myModel").getProperty("/your-property")
    – Andre F
    Nov 22 at 9:40











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53396971%2fhowto-get-openui5-binding-information%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
1
down vote













It looks like this is your first question here, so welcome to StackOverflow!



Although it is expected that you already try out the code for which you seem to have issues and then post it here with the errors or expected results, I will still try to help you out.



To get answers to your question, I would suggest you to read through the Data Binding section under Get Started: Setup and Tutorials of the SAPUI5 Demokit. This includes,




  • Creating a model

  • Property binding

  • Binding paths and formatting values


Once you get the basics right, you will see that with the concept of Two-way Binding, the model is already updated with the new values that you are looking for, if it's changed in the UI and vice-versa.



Also, if you are looking for a particular object or property, you can directly query the model instead of worrying about to which control it is binded.



For example this.getView().getModel("myModel").getProperty("/view/visible") will return the current value of the property "visible" regardless of which control it is binded to.



If my answer totally misses your question, please elaborate on your concerns and we can explore it further.






share|improve this answer





















  • Hi, thanks for your support. I read and so far understood the data binding part of the tutorials. Binding to a JSON model also works fine. The objects within my model represent current values of a connected embedded device, e.g. the current temperature of the device. Now I only want to poll those current values of the embedded device where the corresponding object within the JSON model is bound to a Ui component as the bandwidth to my embedded device is quite limited and I cannot update all the values every second.
    – Mortimer76
    Nov 21 at 7:51












  • So I wonder if there is something like this.getView().getModel("myModel").getBindings() to figure out which objects are bound within the Ui and therefore I have to ask the embedded device for the current values. Example: If the current temperature is bound within the Ui and the current pressure not, then I will poll only the current temperature from the device every second and not the current pressure.
    – Mortimer76
    Nov 21 at 8:02










  • @Mortimer76 if you have a UI element with a property that is bound to your Model then instead of asking the UI element for the bindings it always easier to get the Model property that is bound to that element by using this.getView().getModel("myModel").getProperty("/your-property")
    – Andre F
    Nov 22 at 9:40















up vote
1
down vote













It looks like this is your first question here, so welcome to StackOverflow!



Although it is expected that you already try out the code for which you seem to have issues and then post it here with the errors or expected results, I will still try to help you out.



To get answers to your question, I would suggest you to read through the Data Binding section under Get Started: Setup and Tutorials of the SAPUI5 Demokit. This includes,




  • Creating a model

  • Property binding

  • Binding paths and formatting values


Once you get the basics right, you will see that with the concept of Two-way Binding, the model is already updated with the new values that you are looking for, if it's changed in the UI and vice-versa.



Also, if you are looking for a particular object or property, you can directly query the model instead of worrying about to which control it is binded.



For example this.getView().getModel("myModel").getProperty("/view/visible") will return the current value of the property "visible" regardless of which control it is binded to.



If my answer totally misses your question, please elaborate on your concerns and we can explore it further.






share|improve this answer





















  • Hi, thanks for your support. I read and so far understood the data binding part of the tutorials. Binding to a JSON model also works fine. The objects within my model represent current values of a connected embedded device, e.g. the current temperature of the device. Now I only want to poll those current values of the embedded device where the corresponding object within the JSON model is bound to a Ui component as the bandwidth to my embedded device is quite limited and I cannot update all the values every second.
    – Mortimer76
    Nov 21 at 7:51












  • So I wonder if there is something like this.getView().getModel("myModel").getBindings() to figure out which objects are bound within the Ui and therefore I have to ask the embedded device for the current values. Example: If the current temperature is bound within the Ui and the current pressure not, then I will poll only the current temperature from the device every second and not the current pressure.
    – Mortimer76
    Nov 21 at 8:02










  • @Mortimer76 if you have a UI element with a property that is bound to your Model then instead of asking the UI element for the bindings it always easier to get the Model property that is bound to that element by using this.getView().getModel("myModel").getProperty("/your-property")
    – Andre F
    Nov 22 at 9:40













up vote
1
down vote










up vote
1
down vote









It looks like this is your first question here, so welcome to StackOverflow!



Although it is expected that you already try out the code for which you seem to have issues and then post it here with the errors or expected results, I will still try to help you out.



To get answers to your question, I would suggest you to read through the Data Binding section under Get Started: Setup and Tutorials of the SAPUI5 Demokit. This includes,




  • Creating a model

  • Property binding

  • Binding paths and formatting values


Once you get the basics right, you will see that with the concept of Two-way Binding, the model is already updated with the new values that you are looking for, if it's changed in the UI and vice-versa.



Also, if you are looking for a particular object or property, you can directly query the model instead of worrying about to which control it is binded.



For example this.getView().getModel("myModel").getProperty("/view/visible") will return the current value of the property "visible" regardless of which control it is binded to.



If my answer totally misses your question, please elaborate on your concerns and we can explore it further.






share|improve this answer












It looks like this is your first question here, so welcome to StackOverflow!



Although it is expected that you already try out the code for which you seem to have issues and then post it here with the errors or expected results, I will still try to help you out.



To get answers to your question, I would suggest you to read through the Data Binding section under Get Started: Setup and Tutorials of the SAPUI5 Demokit. This includes,




  • Creating a model

  • Property binding

  • Binding paths and formatting values


Once you get the basics right, you will see that with the concept of Two-way Binding, the model is already updated with the new values that you are looking for, if it's changed in the UI and vice-versa.



Also, if you are looking for a particular object or property, you can directly query the model instead of worrying about to which control it is binded.



For example this.getView().getModel("myModel").getProperty("/view/visible") will return the current value of the property "visible" regardless of which control it is binded to.



If my answer totally misses your question, please elaborate on your concerns and we can explore it further.







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 20 at 19:10









Breakpoint

1,3041636




1,3041636












  • Hi, thanks for your support. I read and so far understood the data binding part of the tutorials. Binding to a JSON model also works fine. The objects within my model represent current values of a connected embedded device, e.g. the current temperature of the device. Now I only want to poll those current values of the embedded device where the corresponding object within the JSON model is bound to a Ui component as the bandwidth to my embedded device is quite limited and I cannot update all the values every second.
    – Mortimer76
    Nov 21 at 7:51












  • So I wonder if there is something like this.getView().getModel("myModel").getBindings() to figure out which objects are bound within the Ui and therefore I have to ask the embedded device for the current values. Example: If the current temperature is bound within the Ui and the current pressure not, then I will poll only the current temperature from the device every second and not the current pressure.
    – Mortimer76
    Nov 21 at 8:02










  • @Mortimer76 if you have a UI element with a property that is bound to your Model then instead of asking the UI element for the bindings it always easier to get the Model property that is bound to that element by using this.getView().getModel("myModel").getProperty("/your-property")
    – Andre F
    Nov 22 at 9:40


















  • Hi, thanks for your support. I read and so far understood the data binding part of the tutorials. Binding to a JSON model also works fine. The objects within my model represent current values of a connected embedded device, e.g. the current temperature of the device. Now I only want to poll those current values of the embedded device where the corresponding object within the JSON model is bound to a Ui component as the bandwidth to my embedded device is quite limited and I cannot update all the values every second.
    – Mortimer76
    Nov 21 at 7:51












  • So I wonder if there is something like this.getView().getModel("myModel").getBindings() to figure out which objects are bound within the Ui and therefore I have to ask the embedded device for the current values. Example: If the current temperature is bound within the Ui and the current pressure not, then I will poll only the current temperature from the device every second and not the current pressure.
    – Mortimer76
    Nov 21 at 8:02










  • @Mortimer76 if you have a UI element with a property that is bound to your Model then instead of asking the UI element for the bindings it always easier to get the Model property that is bound to that element by using this.getView().getModel("myModel").getProperty("/your-property")
    – Andre F
    Nov 22 at 9:40
















Hi, thanks for your support. I read and so far understood the data binding part of the tutorials. Binding to a JSON model also works fine. The objects within my model represent current values of a connected embedded device, e.g. the current temperature of the device. Now I only want to poll those current values of the embedded device where the corresponding object within the JSON model is bound to a Ui component as the bandwidth to my embedded device is quite limited and I cannot update all the values every second.
– Mortimer76
Nov 21 at 7:51






Hi, thanks for your support. I read and so far understood the data binding part of the tutorials. Binding to a JSON model also works fine. The objects within my model represent current values of a connected embedded device, e.g. the current temperature of the device. Now I only want to poll those current values of the embedded device where the corresponding object within the JSON model is bound to a Ui component as the bandwidth to my embedded device is quite limited and I cannot update all the values every second.
– Mortimer76
Nov 21 at 7:51














So I wonder if there is something like this.getView().getModel("myModel").getBindings() to figure out which objects are bound within the Ui and therefore I have to ask the embedded device for the current values. Example: If the current temperature is bound within the Ui and the current pressure not, then I will poll only the current temperature from the device every second and not the current pressure.
– Mortimer76
Nov 21 at 8:02




So I wonder if there is something like this.getView().getModel("myModel").getBindings() to figure out which objects are bound within the Ui and therefore I have to ask the embedded device for the current values. Example: If the current temperature is bound within the Ui and the current pressure not, then I will poll only the current temperature from the device every second and not the current pressure.
– Mortimer76
Nov 21 at 8:02












@Mortimer76 if you have a UI element with a property that is bound to your Model then instead of asking the UI element for the bindings it always easier to get the Model property that is bound to that element by using this.getView().getModel("myModel").getProperty("/your-property")
– Andre F
Nov 22 at 9:40




@Mortimer76 if you have a UI element with a property that is bound to your Model then instead of asking the UI element for the bindings it always easier to get the Model property that is bound to that element by using this.getView().getModel("myModel").getProperty("/your-property")
– Andre F
Nov 22 at 9:40


















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53396971%2fhowto-get-openui5-binding-information%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

To store a contact into the json file from server.js file using a class in NodeJS

Redirect URL with Chrome Remote Debugging Android Devices

Dieringhausen