I have three values and I want one component to be rendered in the case of first two values and another component for the third value
Below, I have my page :
Just to add to Mindwin's answer, you need to understand that is a tag handler, when is a UI component. The former is evaluated while component tree is being built, and the latter - while the view is being rendered, i.e. at a later time. In this light, depenence upon var of is what is wrong with your code, as it hasn't been evaluated when comes into play.
There are two things to be remembered here.
Use an iterative tag handler, , with your contents:
Correct!
With this approach both tags run at the same time (view is being built), so the conflicts won't occur. Just remember that in case your bean is view scoped it will be recreated upon every request.
Use UI component with rendered attribute:
Correct
In this case everything runs as well at the same time (view is being rendered). Note that you can render a whole bunch of HTML with, for example, , as well as some certain JSF tags like , by using a rendered attribute.
Ultimately, go ahead with the classic post: JSTL in JSF2 Facelets… makes sense?, to get a full understanding of relationship between tag handlers and UI components.