I created a custom control and added it to my tag library.
This control displays two selectonemenu’s where the second one depends on the first one and is updated via ajax from data from a database.
Currently I use a view scoped bean for the data selection of the second one. But i am not really satisfied with this solution, since there is one bean for possible multiple instances.
In asp.net there is a control state to save control relevant data. Is there something similar?
Alternatively I could use a request scoped bean with a converter that retrieves the data from the database again on selection.
The equivalent is called
Component Statewhen talking about classes that extendUIComponent.The above is an example of how you can persist component properties across postbacks in a UIComponent. Simply extend the following two methods.