vendredi 27 juillet 2018

Alternative c.if in JSF

Does someone know a alternative to <c.if> for view render time, or even if that is possible. For what I have search until now it doesn't exist, or the alternative would be using the "rendered", but for me doesn't really work.

<af:listView value="#{bindings.date.collectionModel}" var="item" id="lv1">
    <af:listItem id="li2">
        <af:iterator id="i1" value="#{bindings.list.collectionModel}" var="row">
            <c:if test="#{item.bindings.attrid.inputValue eq row.attrid}">
                <ui:param name="varUI" value="true" />
                <c:set var="varC" value="true" />
            </c:if>
        </af:iterator>
        <af:outputText value="#{varUI}" id="otqaswq"/>
        <!--<af:outputText value="#{varC}" id="otqawq"/>-->
        <af:selectBooleanCheckbox text="Activated" id="sbc2" value="#{varUI}"/>
    </af:listItem>
</af:listView>

So in the code above I know that "c." they run in different time, view build time and not on the render time. What I needed was that the af:selectBooleanCheckbox would appear true or false depending if there are values with the same value. My question is, someone know a alternative way of doing this?

Aucun commentaire:

Enregistrer un commentaire