0

In theory what I want to achive is pretty simple:
You choose an item from a sap.m.select which is a category.
This effects which items can be selected in a second sap.m.select that contain items that still need to be requested from a backend system.
On choosing one of the items in the second sap.m.select, a backend request for the full information of the choosen item should be triggert.

This works so far as long is I change the item in the second sap.m.select manually.
But if I choose a category this applys a Filter to the model that is the source for the second sap.m.select.
The problem is: there is no change triggert when the filter is done an thus the current item of the second changed (because one item can only have one category).

I already tried a few things, starting with manually fireing the change event of the second select as soon as I it filter. But all solutions so far did not achieve what I had planned.
(in the example of the manuall fired event after the model for the second select is filtered, the selected item of the second sap.m.select is not yet set. I need that item to know which item to query)

I only have some hacky solutions remaining, like some delay for firing the change event or modifing the handler of the change event to check the model, and the filter, for the first entry and query this in case the selected item of my sap.m.select is not yet set.

But is there nothing like an onBindingUpdated handler or something like this?

Boghyon Hoffmann
  • 17,103
  • 12
  • 72
  • 170
Aeglasin
  • 165
  • 5
  • 16
  • Does this answer your question? [Perform Action after the Binding Is Complete](https://stackoverflow.com/questions/29770332/perform-action-after-the-binding-is-complete) – Boghyon Hoffmann Sep 23 '22 at 12:11
  • hmm I will try it out as soon as I'm back on the system. It just sounds a tad wrong to look at the binding when I actually I'm only interested in when the selected item changes programmatically. Because if I'm not wrong here, what i would need to do on a binding change (because the filter got applied) would be to pick the first element of my filtered model, which I would need to determin manually. My Idea was to get the information simply when the control updates its current Item anyway. – Aeglasin Sep 23 '22 at 12:31

0 Answers0