“<c:if>” and “rendered” is not working at all

半城伤御伤魂 提交于 2019-12-02 21:26:34

问题


I need to read a certain attribute from the parent component... but its not working at all, I tried 2 things to define the attribute using:
<ui:param> and <c:set>

and to read them I tried also 2 things:

<ui:fragment> and <c:if test>

but no luck Here is the code:

 <ui:param name="panelName" value="#{component.parent.attributes.panelName}" />

 <c:set var="panelName2" value="{component.parent.attributes.panelName}" scope="view" />

<c:if test="#{panelName == 'abc'}">
anything
</c:if>

<ui:fragment rendered="#{panelName2 == 'abc'}">
Hellooo
</ui:fragment>

I am using JSF 2.2

Could anyone explain why this is happening please

Thanks in advance

来源:https://stackoverflow.com/questions/30412962/cif-and-rendered-is-not-working-at-all

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!