Composite Component Binding解析为null

时间:2013-07-10 20:57:09

标签: jsf-2.2

我正在尝试将复合组件绑定到ajax侦听器,但绑定变量解析为null。如果我使用绑定变量作为正文的一部分,例如。 #{bind}它确实解决了问题。我认为这是一个错误,但在我报告它之前想要第二个意见。感谢

页:

 <html xmlns="http://www.w3.org/1999/xhtml"
        xmlns:f="http://xmlns.jcp.org/jsf/core"
        xmlns:h="http://xmlns.jcp.org/jsf/html"
        xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
        xmlns:composite="http://xmlns.jcp.org/jsf/composite"
        xmlns:jstl="http://xmlns.jcp.org/jsp/jstl/core"
        xmlns:jfunc="http://xmlns.jcp.org/jsp/jstl/functions"
        xmlns:jid1="http://mydomain.com/facelets">

<h:head></h:head>
<h:body>
    <h:form id="commentBoxForm">
        <jid1:confirmModal title="t" cssID="a" binding="#{bind}">
            </jid1:confirmModal>

            <h:commandLink value="click">
                <f:ajax execute="@this" render="@form"
                    listener="#{bind.getFamily()}" />
            </h:commandLink>
    </h:form>
</h:body>
</html>

成分:

<ui:composition xmlns="http://www.w3.org/1999/xhtml"
        xmlns:f="http://xmlns.jcp.org/jsf/core"
        xmlns:h="http://xmlns.jcp.org/jsf/html"
        xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
        xmlns:composite="http://xmlns.jcp.org/jsf/composite"
        xmlns:jstl="http://xmlns.jcp.org/jsp/jstl/core"
        xmlns:jfunc="http://xmlns.jcp.org/jsp/jstl/functions"
        xmlns:jid1="http://mydomain.com/facelets">

        <composite:interface>
            <composite:attribute name="cssID" required="true" />
            <composite:attribute name="title" required="true" />
        </composite:interface>

        <composite:implementation>

            <h:panelGroup >
                ......
            </h:panelGroup>

        </composite:implementation>
    </ui:composition>

1 个答案:

答案 0 :(得分:0)

这是一个错误。有关详细信息,请参阅here

复合组件binding属性无法正常用于Ajax调用。