The following excerpt
<ui:repeat value="#{resourceProvider.allResources}" var="resource">
<h:outputText value="#{resource.name}"
</ui:repeat>
should display names of resources. But it does not happen. The cause is different bean that contains factory:
@Name("resourceModel")
@Scope(CONVERSATION)
public class ResourceModel {
private Resource resource;
@Factory Resource getResource() {
return resource;
}
}
So when the expression resource.name
is evaluated the resourceModel
instance is created in conversation context and getResource() method is called.
It is not what I expect. For me it seems that page context should have precedence over factory definitions. Could someone clarify this situation?