[英]rich:dndParam with h:dataTable
Hi I am trying to implement drop feature of a4j with JSF Datatable. 嗨,我正在尝试使用JSF Datatable实现a4j的删除功能。 I have a datatable and I want to drop components into that data table.
我有一个数据表,我想将组件放入该数据表中。 How do i do it.
我该怎么做。
The code for dropping it in a tree works fine: 将其放入树中的代码可以正常工作:
Here's is the code of dropping it to the tree, but when i try to drop the same into a data table it doesn't work. 这是将其拖放到树中的代码,但是当我尝试将其拖放到数据表中时,它将不起作用。
<rich:treeNodesAdaptor id="packageNodeAdaptor" nodes="#{target.packages}" var="package">
<rich:treeNode id="package" icon="/img/icons/Package_icon.png"
iconLeaf="/img/icons/Package_empty_icon.png" ajaxSingle="false"
acceptedTypes="dbObject">
<rich:dndParam name="label" value="Add to #{package.name}" />
<a4j:support event="ondrop"
action="doAddDBObjectToPackage"
reRender="targetsMaster,sourcesDetailPanel" status="waitStatus" >
<f:setPropertyActionListener value="#{package}"
target="#{workspace.selectedPackage}" />
</a4j:support><a4j:commandLink
value="#{package.name}" id="commandLink#{package.name}" reRender="targetsDetailPanel">
<f:setPropertyActionListener value="#{package}"
target="#{workspace.selection}" />
</a4j:commandLink>
</rich:treeNode>
</rich:treeNodesAdaptor>
When I try to put the code in h:dataTable it doesnt work. 当我尝试将代码放入h:dataTable时,它不起作用。
Here is the datatable part of it: 这是它的数据表部分:
<rich:dndParam name="label" value="Add to #{package.name}" />
<a4j:support event="ondrop"
action="doAddDBObjectToPackage"
reRender="componentDetailInfoTab,sourcesDetailPanel" status="waitStatus" >
<f:setPropertyActionListener value="#{package}"
target="#{workspace.selectedPackage}" />
</a4j:support>
</rich:dataTable>
Can you guide me how to resolve it. 您能指导我如何解决它。
Thanks, Abdul 谢谢阿卜杜勒
Some richfaces components, such as a4j:commandButton
don't work correct with h:datatable
. 一些Richfaces组件(例如
a4j:commandButton
无法与h:datatable
一起正常工作。
I would try the rich:datatable
instead of h:datatable
to eliminate the possibility that this is your problem. 我会尝试使用
rich:datatable
而不是h:datatable
来消除这是您的问题的可能性。
Placing the dropSupport code inside <rich:dataTable
tag doesn't work. 将dropSupport代码放在
<rich:dataTable
标记内不起作用。 Placing the code just outside the <rich:dataTable
tag, and under the same form works perfectly fine. 将代码放置在
<rich:dataTable
标记的外部,并以相同的形式很好地工作。 The dropSupport code for the tree in my post, works well when placed inside a form where the datatable is defined. 在我的文章中,该树的dropSupport代码放置在定义了数据表的表单中时效果很好。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.