Questions tagged [rendered-attribute]

In JSF (Java Server Faces), the tags have an attribute called rendered. It is used to tell if that UI element should be output or not based on a server-side expression language condition.

66 questions
59
votes
1 answer

Ajax update/render does not work on a component which has rendered attribute

I'm trying to ajax-update a conditionally rendered component. ...
44
votes
8 answers

How to conditionally render an f:selectItem tag?

How can I specify a conditional rendering for an tag. I need to display options according to a specific user's status. For example, I wanted something like:
Rajat Gupta
  • 25,853
  • 63
  • 179
  • 294
39
votes
1 answer

JSF rendered multiple combined conditions

I need to give condition like if((a == 12 and b == 13) or(a == 12 and b == 15)) in JSF rendered attribute. Can anyone help?
Arun
  • 3,701
  • 5
  • 32
  • 43
24
votes
1 answer

JSF Conditional includes, cause Component ID has already been found in the view

I know we can't repeat the ID of any component we have in the same view tree. I have a page which includes another pages by certain condition Like this...
9
votes
3 answers

How do I specify conditions from 2 different beans in a jsf rendered attribute?

I want to do something along the lines of the following but when I use it like this I get a parse error telling me an entity needs to directly follow the '&' character:
rojoca
  • 11,040
  • 4
  • 45
  • 46
7
votes
2 answers

The value of attribute "rendered" associated with [...] must not contain the '<' character

I have numeric values in a p:dataTable. When the value is less than 0, a "-" symbol should be inserted instead of a value. I tried using c:if, which doesn't work. I was reading and people suggest the rendered flag. The code is:
Pablo Aleman
  • 196
  • 1
  • 3
  • 13
5
votes
1 answer

JSF2 composite component - condition on method attribute existenc

I have a simple composite component with an optional ajax listener implemented with the richfaces a4j:ajax component. Here is the interface definition :
Florian
  • 389
  • 1
  • 4
  • 15
4
votes
1 answer

is not interpreted as passthrough element

I don't understand why this piece of code is working: and this piece of code is not working: Login
Gavi
  • 1,300
  • 1
  • 19
  • 39
4
votes
2 answers

javax.el.PropertyNotFoundException when submitting ui:repeat with conditionally rendered properties of different subclasses

In my backing-bean I have a collection of objects of different subclasses sharing a common interface. Inside the view, an ui:repeat iterates over this collection. Inside this loop, different properties have to be rendered depending on the concrete…
MrD
  • 1,255
  • 1
  • 10
  • 24
3
votes
1 answer

Although rendered="false", content of a h:dataTable is always evaluated

I have got a problem with the HtmlDataTable of JSF 2.0. On my web page, i have got a h:dataTable and some other content, which should only be rendered if the user is logged in. The content of the HtmlDataTable is loaded from a database. Although the…
w4rumy
  • 31
  • 2
3
votes
1 answer

panelGroup rendered tag not working

I have a tag with a rendered attribute. The function it calls to determine whether it renders or not returns true, I have logged and printed this to make sure. The structure looks as follows:
Skytiger
  • 1,745
  • 4
  • 26
  • 53
3
votes
1 answer

conditional rendered f:selectItem possible problems

I have a page with several h:selectOneMenu or p:selectOneMenu and I want to use the same page for editing and adding data. When I will edit data I need f:selectItem. I know that this component doesn't have attribute rendered. And I read that I can…
Ray
  • 1,788
  • 7
  • 55
  • 92
2
votes
1 answer

JSF: why is empty test in rendered invoked during apply request values phase during form submission under request scoped POST REDIRECT GET

This question is spawned from the partial answer to JSF2: why does empty test in rendered of panelGroup in composite prevent action from being called? In the following an Element is an @Entity with a name and id. A view.xhtml JSF page takes the id…
2
votes
1 answer

Conditionally render JSF h:panelGrid based on presence of query string (or no query string at all)

I'm trying to dynamically render some composition/templates based on the presence of a query string or the absence of a query string. For example: localhost:9080/myWonderfulApp/test.xhtml?foo=bar This works, A.xhtml gets pulled…
magenta placenta
  • 1,461
  • 7
  • 22
  • 34
2
votes
1 answer

How to check if a JSF UIComponent is valid in a jsp file?

In a jsp file, is there a way to find a component on that page and check if that component is valid. Say i have a an input field, and a panelGroup with complex html that should be showed if validation failed on the input field. What i'm really…
zoma
  • 35
  • 1
  • 6
1
2 3 4 5