on 2023 Dec 01 11:51 AM
I have a smartFilterBar that contains controlConfigurations with nested customControls inside them like so..
<smartFilterBar:ControlConfiguration key="CC_PLANT_ID" app:text="NAME1" app:params="CC_PLANT_ID,NAME1" index="7"app:length="400label="{i18n>labelFilterStore}" groupId="_BASIC">
<smartFilterBar:customControl>
<MultiComboBox id="PlantName" selectionFinish=".FilterController._cascadeFilters" selectionChange="onSelectMultiboxItem"/>
</smartFilterBar:customControl>
</smartFilterBar:ControlConfiguration>
In my Filter control I have the following snippet.
for (var i = 0; i < filterBar.getControlConfiguration().length; i++) {
var control = filterBar.getControlConfiguration()[i];
var oComboBox = control.getCustomControl(); //problematic line
}
//bind the filters for the comboBox
The issue is that when the controller is first initialized and the snippet runs for the first time, control.getCustomControl() correctly returns the comboBox object and the filters are assigned correctly. When I navgiate away from this XML view and then come back to it, the snippet is fired a second time but this time control.getCustomControl() returns null and hence no filters are set. Can someone please explain to me what may be the cause for this customControl to be lost?
I've been stuck on this for a few days and have pretty much analyzed the code and debugged all possible ways I can think of. I'm not a Fiori dev, but I need to support some apps for a client every now and then.
Thanks
User | Count |
---|---|
79 | |
11 | |
10 | |
10 | |
10 | |
9 | |
8 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.