Skip to content

Instantly share code, notes, and snippets.

@romartin
Created February 14, 2020 17:05
Show Gist options
  • Save romartin/0b06321c161342d29351c810c835bf15 to your computer and use it in GitHub Desktop.
Save romartin/0b06321c161342d29351c810c835bf15 to your computer and use it in GitHub Desktop.
@SuppressWarnings("unchecked")
void onCommandExecuted(final @Observes CanvasCommandExecutedEvent commandExecutedEvent) {
checkNotNull("commandExecutedEvent",
commandExecutedEvent);
Command command = commandExecutedEvent.getCommand();
if (command instanceof UpdateElementPropertyCommand) {
UpdateElementPropertyCommand propertyCommand = (UpdateElementPropertyCommand) command;
Element<View<?>> element = propertyCommand.getElement();
String propertyId = propertyCommand.getPropertyId();
Object value = propertyCommand.getValue();
if (null != element.asNode()) {
Object bean = element.getContent().getDefinition();
// Check if the bean is a DataObject
if (bean instanceof DataOject ) {
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment