In addition to what @hecnabae says, it would take rendering logic to the backend to not load the presentation layer with logic, especially when this logic can potentially be much more complex.
HTML
<h:outputLabel value="#{msg.fecha}"
rendered="#{aperturaDoBean.msgLabelRenderingCondition()}" />
OpeningDoBean.java
protected List<Integer> invalidIds;
@PostConstruct
public void init(){
invalidIds = new ArrayList<Integer>(Arrays.asList(3, 4, 5));
}
public boolean msgLabelRenderingCondition(){
//Tu lógica aquí, en este caso sería:
return !invalidIds.contains(dataItem6.idServicio);
}
The list of invalid identifiers is loaded in the @PostConstruct therefore we make sure to load it only once after the constructor of AperturaDoBean
was invoked
Then from the method msgLabelRenderingCondition()
we obtain the condition of rendered.