Hello James,

you are right, listAll() is called twice. This is because in your
use-case scenario, there are 2 separate transactions involved. Each
transaction needs to fetch the current state from the persistence layer.
(Which is hopefully cached anyway.)

Note: while you are clicking on these check-boxes, someone else might in
the meantime have removed or added some entities to this list.

However, I agree with you, that this behavior might be counter-intuitive.

Cheers Andi!

On 2018/03/14 14:05:31, "[email protected]" <[email protected]> wrote:
>
>
>
>
>
>
> Hi ,When a menu action generate a collection, like listAll() in
SimpleObjectMenu,?and a button was contributed to this collection, If
click this button(action) ,method ?listAll() will be called again.
> For example:We change some code slightly ?in SimpleObject.class
> .............????????@Action(invokeOn =
InvokeOn.OBJECT_AND_COLLECTION) public SimpleObject delete() { // just
for demo
> return this;
> }...........when call List All on menu, it will list all Simple
Objects,and <Delete> button will show on top of collection.If we?pick a
checkbox and click <Delete> button, listAll() method will be called
again.This behavior is nonsense.Thanks.James Chu
>
>
>

Reply via email to