1 person found this helpful
The ChildProvider re-uses created itemRenderers a bit like the Spark List with virtualLayout enabled ( virtualLayout is not supported when using itemRenderer functions for the same reason). As such adding an itemRendererFunction would involve loosing this UIComponent "caching" feature for this specific case.
If you fill that this feature is important could you please create an enhancement request on our JIRA?
As a temporary workaround you can rely on states to rearrange the layout of your renderers based on the data property. You may also be interested in the classFactory feature to pass properties to your itemRenderers (http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/core/ClassFactory.ht ml)
In fact using state on the renderer component is more or less what I've already done (I make the "switch" to "add" the desire component to display versus the "data" property type given by the Observer).
But what I don't like is the two possible components are instanciated at start untill the test is done and switch from the right one to be displayed.
As you told me it seems it's not the purpose f the Observer business to do what I want. I will extend TabNavigator in order to manage my request (eg. the first Tab is my "search tab with filter and datagrid which when clicked on a row add a new Person Tab managed by the Observer")
Thx anyway Nicolas