Reputation: 4177
class A{
private List<B> list;
// getter setter
public class B{
@command
public void delete(){
// remove itself from list
// Now how to post event to event queue to update list on browser
}
}
}
The list
is bind in a zul page.
One way i found is to use BindUtils.postNotifyChange(null, null, this, "list");
but it doesnt work
Upvotes: 0
Views: 572
Reputation:
Try it:
BindUtils.postNotifyChange(null, null, A.this, "list");
Reference:
Upvotes: 0
Reputation: 3400
If A is the VM than the correct call is
BindUtils.postNotifyChange(null, null, A.this, "list");
In java you call the this pointer in a nested class with ParentClassName.this
Upvotes: 1
Reputation: 649
I'm not quite clear on what the question is, but I'll take a stab at answering it.
Since B
is not static (must exist within the context of an instance of A
), you can call A.this.list
to access list
from within B
.
Upvotes: 0