Imagine a widget that can display lists of orders. You can use the Info
Framework so that it shows any list of orders provided through
First you must obtain a list of all available providers for the desired type, and then you would obtain a specific provider through that list.
The list of all available providers for
MyOrder, can be obtained done by using the
@Reference InfoListProviderTracker _infoListProviderTracker;
Once a tracker is available, obtaining the list is as simple as invoking
When the user selects an item from this list, you can store the class’s name.
When a specific provider is desired it can be obtained through its class name as follows:
Using renderers from a custom application is almost identical to using providers. Here is the equivalent code to what you’ve seen previously:
_infoItemRendererTracker.getInfoItemRenderers(MyOrder.class.getName()); String infoItemRendererClassName = MyOrderRenderer.class.getName(); _infoItemRendererTracker.getInfoItemRenderer(infoItemRendererClassName);