Jsf 2 数据表POPUPANEL主详细信息不';不保存编辑的值
我有一个产品列表,它显示在datatable中,并希望在弹出窗口中编辑datatable中的特定行,如下所述 包含所有员工详细信息的数据表,每行都有编辑按钮。单击编辑按钮时,新弹出窗口应显示特定单击产品的现有信息,编辑后,必须在列表中以及数据表中反映该特定对象的更改 我正在为之奋斗,但我无法保存已编辑产品中的更改。当弹出窗口打开时,我可以看到所选项目的属性,但当我更改属性时,没有任何更改。 下面是我的jsf代码Jsf 2 数据表POPUPANEL主详细信息不';不保存编辑的值,jsf-2,datatable,popup,richfaces,Jsf 2,Datatable,Popup,Richfaces,我有一个产品列表,它显示在datatable中,并希望在弹出窗口中编辑datatable中的特定行,如下所述 包含所有员工详细信息的数据表,每行都有编辑按钮。单击编辑按钮时,新弹出窗口应显示特定单击产品的现有信息,编辑后,必须在列表中以及数据表中反映该特定对象的更改 我正在为之奋斗,但我无法保存已编辑产品中的更改。当弹出窗口打开时,我可以看到所选项目的属性,但当我更改属性时,没有任何更改。 下面是我的jsf代码 <a4j:outputPanel ajaxRendered="true">
<a4j:outputPanel ajaxRendered="true">
<h:dataTable id="table1" value="#{productBean.products}" var="item"
styleClass="resultTable" headerClass="resultTableHeader"
rowClasses="resultTableRow">
<h:column>
<f:facet name="header">
<h:outputText value="Part#" />
</f:facet>
<h:outputText value="#{item.partNumber}" />
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="Product Description" />
</f:facet>
<h:outputText value="#{item.description}" />
</h:column>
<h:column>
<a4j:commandButton value="Edit" action="#{productBean.setEditItem(item)}" oncomplete="#{rich:component('popup')}.show()"> </a4j:commandButton>
<rich:popupPanel id="popup" modal="true" resizeable="true"
onmaskclick="#{rich:component('popup')}.hide()">
<f:facet name="header">
<h:outputText value="Edit property of the product" />
</f:facet>
<f:facet name="controls">
<h:outputLink value="#"
onclick="#{rich:component('popup')}.hide(); return false;">
X
</h:outputLink>
</f:facet>
<!-- editProduct ı burda item yerine kullan -->
<table style="align: center;">
<tr>
<td><h:panelGrid columns="2">
<h:outputText value="Description"></h:outputText>
<h:inputText value="#{productBean.item.description}"></h:inputText>
</h:panelGrid></td>
</tr>
<tr>
<td><h:panelGrid columns="2">
<h:outputText value="Part Number"></h:outputText>
<h:inputText value="#{item.partNumber}"></h:inputText>
</h:panelGrid></td>
</tr>
</table>
<a4j:commandButton value="Submit" action="#{productBean.actionEditProductsFromDatabase(item)}" execute="@popup"/>
<a4j:commandButton value="Cancel" onclick="#{rich:component('editPane')}.hide(); return false;" />
</rich:popupPanel>
</h:column>
</h:dataTable>
</a4j:outputPanel>
</h:form>
X
参考RichFaces组件参考中的放置标注:
组件通常在任何
页面上的其他对象。这是通过连接部件来实现的
添加到页面的
元素,并设置非常高的“z索引”
(对象的堆栈顺序)。采取这种方法是因为
如果出现以下情况,相对定位的元素仍可能与弹出面板重叠
它们存在于DOM层次结构的更高级别,即使它们的
z索引小于
组件
如果
要参与提交子项
组件/行为,则必须在
。或者,如果不存在重叠元素,
组件可以重新附加到其原始DOM
元素,方法是将DomeElementAttachment设置为父元素或窗体