Jquery Primefaces数据表post contenteditable div
我是primefaces的新手,不知道如何实现从datatable向managedbean发布数据。DataTable单元格是html5 div,已启用contenteditable。我想发布有关模糊事件的单元格数据。有人能帮我解决这个问题吗Jquery Primefaces数据表post contenteditable div,jquery,jsf,jsf-2,primefaces,datatable,Jquery,Jsf,Jsf 2,Primefaces,Datatable,我是primefaces的新手,不知道如何实现从datatable向managedbean发布数据。DataTable单元格是html5 div,已启用contenteditable。我想发布有关模糊事件的单元格数据。有人能帮我解决这个问题吗 <p:dataTable id="workRecordItems" var="wrItem" value="#{workRecordBean.workRecordItems}" style="margin-top:2
<p:dataTable
id="workRecordItems"
var="wrItem"
value="#{workRecordBean.workRecordItems}"
style="margin-top:20px;"
styleClass="workrecord-item-data-table"
editable="true"
editMode="cell">
<p:column headerText="Opis">
<p:outputPanel styleClass="workrecord-item-data-table-content" pt:contenteditable="true">#{wrItem.note}</p:outputPanel>
</p:column>
<p:column headerText="Od" width="80">
<p:outputPanel styleClass="workrecord-item-data-table-content" pt:contenteditable="true" style="text-align:center;">#{wrItem.fromString}</p:outputPanel>
</p:column>
<p:column headerText="Do" width="80">
<p:outputPanel styleClass="workrecord-item-data-table-content" pt:contenteditable="true" style="text-align:center;">#{wrItem.toString}</p:outputPanel>
</p:column>
<p:column headerText="Čas" width="80">
<p:outputPanel styleClass="workrecord-item-data-table-content" pt:contenteditable="true" style="text-align:center;">#{wrItem.timeDiffString}</p:outputPanel>
</p:column>
<p:column headerText="Zar." width="60">
<p:selectBooleanCheckbox style="margin-left:15px;margin-top:2px;" value="#{wrItem.billing}"/>
</p:column>
</p:dataTable>
#{wrItem.note}
#{wrItem.fromString}
#{wrItem.toString}
#{wrItem.timeDiffString}
您可以添加managedbean代码吗?我想在blur事件上发布单元格数据
但对于组件blur事件,您指的是哪个?outputpanel上的blur。此面板是可编辑的,在模糊后,我想将值设置为item属性。GetWorkRecordItems方法返回list ob WorkRecordItems项。您需要首先了解JSF的基础知识。让我们先看一看这本书