The existing documentation for @DataModelSelection and @DataModelSelectionIndex seems to indicate to developers that you are naming the @DataModelSelection or @DataModelSelectionIndex context variable by specifying the value. I have heard this same question from every new member of my team when they try to use 2 DataModels in one component.
The following patch (or something along these lines) is recommended for both @DataModelSelection and @DataModelSelectionIndex:
Injects the selected value from the JSF DataModel (this is the element of the underlying collection, or the map value) that the DataModelSelection is associated with. If only one @DataModel attribute is defined for a component, the selected value from that DataModel will be injected. Otherwise, the component name of each @DataModel must be specified in the value attribute for each @DataModelSelection.
private List<String> list1;
private String focusList1;
private List<String> list2;
private String focusList2;
Specifies that the attribute focusList1 is to be injected with the DataModelSelection for the component list1, and similarly focusList2 is injected with the DataModelSelection for list2. Note: @DataModelSelection is like @In. If you want to outject a DataModelSelection, you will have to do so explicitly through by annotating the attribute with @Out.
- value - name of the @DataModel conversation context variable this @DataModelSelection is associated with. Not needed if there is exactly one @DataModel in the component.