Primefaces f:setPropertyActionListener未在p:datatable中设置属性

Primefaces f:setPropertyActionListener未在p:datatable中设置属性,primefaces,Primefaces,解决方案 长话短说,“notempty”{passtxmodel.currentTx.xml}应该是“{notempty passtxmodel.currentTx.xml}”。是的,我知道 更新 问题在于: <p:inputTextarea id="test" value="#{pastTxModel.currentTx.xml}" rendered="not empty #{pastTxModel.currentTx.xml}"></p:inputTextarea>

解决方案 长话短说,
“notempty”{passtxmodel.currentTx.xml}
应该是
“{notempty passtxmodel.currentTx.xml}”
。是的,我知道

更新 问题在于:

<p:inputTextarea id="test" value="#{pastTxModel.currentTx.xml}" rendered="not empty #{pastTxModel.currentTx.xml}"></p:inputTextarea>

说来话长,但解决方案是-

第1部—

<h:form id="alltxform">
    <p:dataTable id="tablealltx" var="transaction" value="#{transactionListModel.txList}">    
        <p:column>
            <p:commandButton update=":alltxform:xmlDetail" action="#{transactionListModel.setSelectedTx(transaction)}">  
            </p:commandButton>
        </p:column>
    </p:dataTable>

    <p:dialog header="Detail" widgetVar="dialog">
        <p:outputPanel id="xmlDetail">
            <p:inputTextarea id="test" value="#{pastTxModel.currentTx.xml}" rendered="not empty #{pastTxModel.currentTx.xml}"></p:inputTextarea>
        </p:outputPanel>
    </p:dialog> 
</h:form>

然后改变-

<p:inputTextarea id="test" value="#{pastTxModel.currentTx.xml}" rendered="not empty #{pastTxModel.currentTx.xml}"></p:inputTextarea>

到-


说来话长,但解决方案是-

第1部—

<h:form id="alltxform">
    <p:dataTable id="tablealltx" var="transaction" value="#{transactionListModel.txList}">    
        <p:column>
            <p:commandButton update=":alltxform:xmlDetail" action="#{transactionListModel.setSelectedTx(transaction)}">  
            </p:commandButton>
        </p:column>
    </p:dataTable>

    <p:dialog header="Detail" widgetVar="dialog">
        <p:outputPanel id="xmlDetail">
            <p:inputTextarea id="test" value="#{pastTxModel.currentTx.xml}" rendered="not empty #{pastTxModel.currentTx.xml}"></p:inputTextarea>
        </p:outputPanel>
    </p:dialog> 
</h:form>

然后改变-

<p:inputTextarea id="test" value="#{pastTxModel.currentTx.xml}" rendered="not empty #{pastTxModel.currentTx.xml}"></p:inputTextarea>

到-


单击按钮后,需要更新整个对话框

<p:commandButton update=":alltxform:Detail" oncomplete="PF('dialog').show()">  
                <f:setPropertyActionListener value="#{transaction}"
                    target="#{transactionListModel.selectedTx}" />  
        </p:commandButton>

单击按钮后,需要更新整个对话框

<p:commandButton update=":alltxform:Detail" oncomplete="PF('dialog').show()">  
                <f:setPropertyActionListener value="#{transaction}"
                    target="#{transactionListModel.selectedTx}" />  
        </p:commandButton>


未更改任何内容未更改任何内容我使用的操作=“#{pastTxModel.selectedTx(transaction)}”,但selectedTx保持为空,通过bean-controllerBean.pastTxMode访问它‌​l、 selectedTx(transact‌​事务确实有值吗?很抱歉,您的bean是transactionListModel-因此更改为transactionListModel.setSelectedTx(事务)我重命名了它们,它是相同的。由于某些原因,未设置selectedTx。txList很好。语法是not-rendered=“#{not empty pastTxModel.currentTx.xml}”吗?我使用了action=“#{pastTxModel.selectedTx(transaction)}”,但selectedTx保持为空,通过bean-controllerBean.pastTxMode访问它‌​l、 selectedTx(transact‌​事务确实有值吗?很抱歉,您的bean是transactionListModel-因此更改为transactionListModel.setSelectedTx(事务)我重命名了它们,它是相同的。由于某些原因,未设置selectedTx。txList很好。语法是否未呈现=“#{not empty pastxmodel.currentTx.xml}”?