BrightSide Workbench Full Report + Source Code
org.turro.zkoss.util.LongOperation Class Reference

Static Public Member Functions

static void executeLongOperation (Component component, final Command command)
 
static void executeLongOperation (final Component component, final String busyMsg, final Command command)
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 34 of file LongOperation.java.

Member Function Documentation

◆ executeLongOperation() [1/2]

static void org.turro.zkoss.util.LongOperation.executeLongOperation ( Component  component,
final Command  command 
)
static

Definition at line 38 of file LongOperation.java.

38  {
39  executeLongOperation(component, null, command);
40  }
static void executeLongOperation(Component component, final Command command)

◆ executeLongOperation() [2/2]

static void org.turro.zkoss.util.LongOperation.executeLongOperation ( final Component  component,
final String  busyMsg,
final Command  command 
)
static

Definition at line 42 of file LongOperation.java.

42  {
43  if(!Strings.isBlank(busyMsg)) {
44  Clients.showBusy(busyMsg);
45  }
46  component.addEventListener(LONG_OPERATION_EVENT, new EventListener<Event>() {
47  @Override
48  public void onEvent(Event event) throws Exception {
49  Context ctx = new Context();
50  command.execute(ctx);
51  if(!Strings.isBlank(busyMsg)) {
52  Clients.clearBusy();
53  }
54  component.removeEventListener(LONG_OPERATION_EVENT, this);
55  }
56  });
57  Events.echoEvent(LONG_OPERATION_EVENT, component, null);
58  }

The documentation for this class was generated from the following file: