1

我正在使用 Apache Isis 开发应用程序,但没有找到任何关于如何呈现集合(项目列表)、允许用户仅选择其中一些以及执行仅适用于选择的那些

有可能做到吗?有什么建议吗?

谢谢

4

1 回答 1

1

实际上,您的用例是受支持的:您需要使用 @Action(associateWith=...),请参阅 [1]。

例如,假设我们有一个“removeItems(…)”动作:

public class Order {

    @Collection
    SortedSet<OrderItem> getItems() { ... }

    ...

    @Action(associateWith="items", associateWithSequence="2")
    public Order removeItems(SortedSet<OrderItem> items) { ... }
}

然后,Wicket 查看器将使用复选框呈现“项目”集合,如果调用该操作,任何选定的项目都将用作预先选择的项目集

HTH丹

[1] http://isis.apache.org/guides/rgant/rgant.html#_rgant-Action_associateWith

于 2019-11-30T09:32:07.627 回答