I’d like to set the position of a modal dialog dynamically to the position of the item click event.
I get the x and y position from click event. In descriptor I can set x and y position of the dialog, but how can I do it dynamically in the event?
@Subscribe("myGrid")
protected void onMyGridClick(final DataGrid.ItemClickEvent<Customer> anEvent)
{
final int xPos = anEvent.getClientX();
final int yPos = anEvent.getClientY();
screenBuilders.editor(Customer.class, this)
.withOpenMode(OpenMode.DIALOG)
.withAfterCloseListener(e -> myGridRefresh.actionPerform(myGrid))
.build()
.show();
}