cancel
Showing results for 
Search instead for 
Did you mean: 

Fiori app: Configuration.getCustomControl() returns null on second execution

mitko1994
Participant
0 Kudos
112

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

Accepted Solutions (0)

Answers (0)