panelGroup rendered tag not working

Skytiger picture Skytiger · Sep 5, 2013 · Viewed 7.9k times · Source

I have a <h:panelGroup> 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:

<h:form>
    <div><!-- content --></div>
    <h:panelGroup>
        <h:panelGroup rendered="#{bean.function(parameter)} == true">
            <!-- content -->
        </h:panelGroup>
    <h:panelGroup>
</h:form>

The panelGroup with the rendered tag is never displayed, even though the function returns true. Any idea why this isn't working?

Answer

Skytiger picture Skytiger · Sep 5, 2013

The problem, that I have found(silly me) is that the rendered tag should be rendered="#{bean.function(parameter) == true}" as opposed to rendered="#{bean.function(parameter)} == true"