2012-05-18 33 views
0
<rich:dataTable id="companyList" var="company" 
    value="#{companyList.resultList}" 
rowClasses="odd-row, even-row" 
    rendered="#{not empty companyList.resultList}"> 
    <rich:column width="25px" style="text-align:center;"> 
    <f:facet name="header">#{messages.Edit}</f:facet> 
    <a4j:commandLink reRender="companyPanel" 
    oncomplete="#{rich:component('companyPanel')}.show()" 
    style="align: center;">          <f:setPropertyActionListener target= 
"#{companyHome.instance}" 
    value="#{company}" /> 
    <rich:toolTip value="#{messages.Edit}" /> 
    </a4j:commandLink> 
    </rich:column> 
    <h:column> 
    <f:facet name="header"> 
#{messages.companyName}</f:facet> 
    #{company.companyName} 
    </h:column> 
    </rich:dataTable> 

嗨我有一些問題,我豐富的數據表。所有的操作都正常工作,我在dataTable中搜索了一些數據,我在數據表中得到了真正的列表,但是,如果我嘗試更新列中的某些數據,就會出現錯誤的實例。例如,我選擇香蕉這個名字是我的數據,但它在搜索數據之前帶來的不是香蕉。我不懂爲什麼。對不起我的英文。jboss豐富的數據表錯誤的數據

回答

0

不知道,但,你有沒有試過這種

<f:setPropertyActionListener target="#{companyHome.id}" value="#{company.id}" /> 

代替

<f:setPropertyActionListener target="#{companyHome.instance}" value="#{company}" />