You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<div jsf:rendered="#{false}">div NOT rendered</diiv>
<div jsf:rendered="#{true}">div IS rendered</diiv>
<p jsf:rendered="#{false}">p NOT rendered</diiv>
<p jsf:rendered="#{true}">p IS rendered</diiv>
<button type="button" jsf:rendered="#{false}">button NOT rendered</button>
<button type="button" jsf:rendered="#{true}">button is RENDERED</button>
However if the element is an <a> then the jsf:rendered is not applied if the element does not have something like an jsf:outcome or jsf:action for example:
Would expect that the jsf:rendered attribute is applied to any html element. It appears that the <a> element is being treated differently.
eclipse-ee4j/mojarra#5212 was opened on this and it was determined that is is because the <a> could be handled by multiple components (h:link, h:commandButton, etc) and since there is no identifying attribute (jsf:action or jsf:outcome for example).
I would propose that if no identifying attribute is found then it should be treated like any other html element (like a div) and the jsf:rendered should still be considered. Otherwise this is confusing and can lead to elements being rendered to the user unexpectedly.
The text was updated successfully, but these errors were encountered:
codylerum
changed the title
HTML link element rendered attribute is not applied if no identifying attributes
HTML link element rendered attribute is not applied if no identifying attributes exist
Feb 10, 2023
The following works fine in JSF 2.3
However if the element is an
<a>
then the jsf:rendered is not applied if the element does not have something like anjsf:outcome
orjsf:action
for example:Expected behavior
Would expect that the
jsf:rendered
attribute is applied to any html element. It appears that the<a>
element is being treated differently.eclipse-ee4j/mojarra#5212 was opened on this and it was determined that is is because the
<a>
could be handled by multiple components (h:link
,h:commandButton
, etc) and since there is no identifying attribute (jsf:action
orjsf:outcome
for example).I would propose that if no identifying attribute is found then it should be treated like any other html element (like a div) and the
jsf:rendered
should still be considered. Otherwise this is confusing and can lead to elements being rendered to the user unexpectedly.The text was updated successfully, but these errors were encountered: