icefaces 3.3 rendered attribute does not work correct

652 Views Asked by At

I am using the rendered attritube to display a "x" in my datatable. The x is printed every time even if its value is false.

                <ace:column id="aktiviert" headerText="Aktiviert" sortBy="#{user.aktiviert}" filterBy="#{user.aktiviert}">
                    <ace:cellEditor>
                        <f:facet name="output">
                            <h:outputText value="x" rendered="#{user.aktiviert}"/>
                        </f:facet>
                        <f:facet name="input">
                            <ace:checkboxButton id="aktiviertInput" value="#{user.aktiviert}" />                    
                        </f:facet>
                    </ace:cellEditor>      
                </ace:column>  

If I put another outputText before, it works!

                        <f:facet name="output">
                            <h:outputText value="" rendered="#{user.aktiviert}"/>
                            <h:outputText value="x" rendered="#{user.aktiviert}"/>
                        </f:facet>

Now the x is only printed, if the boolean value at the backend is true. With the first access, my rendered attribute always works like the value is true.

Is there a known bug? This is since the update from icefaces 3.2 to 3.3.

This is my getter on the Entity.

@Column(name = "AKTIVIERT")
public Boolean getAktiviert() {
    System.out.println("Aktiviert : " + aktiviert);
    if (aktiviert == null) {
        return false;
    } else {
        return aktiviert;
    }
}
1

There are 1 best solutions below

1
On

if you are changing the properties via ajax, you will need to use the "alwaysExecuteContents" on the ace:dataTable. I did a quick test and found once setting this attribute to "true", the rendered flag on the facets were updated properly.