我正在使用Apache Isis开发一个应用程序,我没有找到任何关于如何呈现集合(项目列表(,允许用户仅选择其中的一部分,并执行仅应用于SELECTED的Action的示例。
有可能做到吗?有什么建议吗?
谢谢
事实上,你的用例是受支持的:你需要使用 @Action(associateWith=...(,参见 [1]。
例如,假设我们有一个"removeItems(...("操作:
public class Order {
@Collection
SortedSet<OrderItem> getItems() { ... }
...
@Action(associateWith="items", associateWithSequence="2")
public Order removeItems(SortedSet<OrderItem> items) { ... }
}
然后,Wicket 查看器将使用复选框呈现"items"集合,如果调用该操作,任何选定的项目都将用作预先选择的项目集
呵呵 担
[1] http://isis.apache.org/guides/rgant/rgant.html#_rgant-Action_associateWith