I have bilateral One to Many Relationship in a JSF + JPA application. I want to list out only filtered items from the list in the view. Doing it in the controller is difficult a
The PrimeFaces You can just make use of with this CSS As to your failed attempt with JSTL runs during view build time, like You only need to take into account that this breaks view scoped beans when using a Mojarra version older than 2.1.18.
actually hides the and generates a
itemDisabled
attribute and then use CSS to set disabled items to display: none
..ui-selectlistbox-item.ui-state-disabled {
display: none;
}
; it failed because the
is evaluated during view build time, not during view render time. However, the
runs during view render time. During that moment the
is nowhere available in the component tree. It's supposed to be attached to an UISelectOne
/UISelectMany
parent during view build time.
, so using JSTL
for the loop and
for the conditional building (not rendering!) should do it as well:See also: