This works very well and returns a list of Portlet (interface) objects, which are in fact PortletImpl objects at runtime.
When trying to construct a beanitemcontainer based on the fetched list there are also no problems.
The problems arise when I bind the container to the Combobox.
When starting the application nothing is displayed. I was expecting to see a combobox with a lot of items in it with a caption of the memory address since I did not set the itemcaptionmode.
If i replace the interface with an implementation class it works just fine.
Does this mean you cannot use interface type for beanitemcontainer or am I overlooking something?
But even with no itemcaption mode specified I don’t get a filled combobx with memory addresses (which I would expect when no captionmode is specified.
Problem solved! I was using a wrong id property. Portlet.getId() always returns 0 and this property is used in equals method. So container thinks all elements are the same!