@SmartNotifyChange

Syntax

@SmartNotifyChange("anotherProperty")

@SmartNotifyChange({"firstProperty", "secondProperty"})

@SmartNotifyChange("*")

@SmartNotifyChange(".")

Description

Target: method (command method)

Purpose: Notify value change once it has changed, unlike @NotifyChange. Usually the annotation is used with @Command.

Example

public class OrderVM {

    //other code...

    //action command
    @SmartNotifyChange({"selected", "orders", "messages"})
    @Command
    public void newOrder() {
        Order order = new Order();
        getOrders().add(order); // add new order to order list
        selected = order; // select the new one
    }
}