GUI-Api goes FirstSpirit - Dialog Boxes inside the Client
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
A common feature request amongst developers was to create interactive dialogs within the FirstSpirit JavaClient.
This request came true with the FirstSpirit 4.2 R4 release.
Code-Example for the Dialog Boxes stated below:
import de.espirit.firstspirit.agency.OperationAgent;
import de.espirit.firstspirit.ui.operations.RequestOperation;
// get operation agent
operationAgent = context.requireSpecialist(OperationAgent.TYPE);
// get request operation
requestOperation = operationAgent.getOperation(RequestOperation.TYPE);
// configure request operation
no = requestOperation.addAnswer("Oh, you better don't ask!");
waiting = requestOperation.addAnswer("Maybe, maybe not. Who knows?");
yes = requestOperation.addYes();
requestOperation.setInitialAnswer(waiting);
requestOperation.setKind(RequestOperation.Kind.ERROR);
requestOperation.setTitle("Happy Day");
// perform request to open dialog
result = requestOperation.perform("Are you okay?");
if (result == yes) {
requestOperation = operationAgent.getOperation(RequestOperation.TYPE);
requestOperation.perform("Oh, really? Then have a nice day ! 🐵 ");
}
Dialog Boxes for the given Code-Example
Start-Box:
Result from clicking "Yes":
API-Links:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.