2013-03-15 51 views
0

我有一個commandButton作爲表中的一部分行。它從列表中刪除元素。該列表是一個表的值。我知道該元素已成功刪除,但表不會更新。如何使它工作。按鈕標籤:commandButton執行動作,但不執行upfate

<p:column style="width:1%"> 
        <p:commandButton id="deleteButton" title="Del" 
         icon="ui-icon-close"                  
         update="attachmentsTable" immediate="true" 
         action="#{myBean.attachTable.deleteAttachment(attachment.id)}"> 
        </p:commandButton> 
       </p:column> 

表標籤:

<p:dataTable id="attachmentsTable" var="attachment" 
       style="width:100%;" 
       value="#{myBean.attachTable.attachmentsList}" 
       emptyMessage="Empty"> 
+0

通常問題通過更新所有窗體,包含許多表格解決。但如何執行部分更新? 'process =「@ this」' - 沒有幫助。 – 330xi 2013-03-15 08:06:25

+0

爲您的問題提供更多背景:發表您的觀點 – kolossus 2013-03-15 11:41:13

回答

0

嘗試使用形式限定名稱,即update=":formWithTable:attachmentsTable"。還檢查您的瀏覽器中的JavaScript錯誤,它通常會給出錯誤提示...