List of usage examples for com.google.gwt.view.client RowCountChangeEvent isNewRowCountExact
public boolean isNewRowCountExact()
From source file:org.jboss.as.console.client.shared.viewframework.EntityEditor.java
License:Open Source License
/** * Create a new Entity./*from w w w.j a va2 s. co m*/ * * @param entitiesName The display name (plural) of the entities. * @param window The window used for creating a new entity. * @param table The table that holds the entities. * @param entityDetails The EntityDetails that manages CRUD for the selected entity. */ public EntityEditor(FrameworkPresenter presenter, String entitiesName, EntityPopupWindow<T> window, DefaultCellTable<T> table, EntityDetails<T> entityDetails, EnumSet<FrameworkButton> hideButtons) { this.presenter = presenter; this.entitiesName = entitiesName; this.window = window; this.table = table; this.details = entityDetails; this.hideButtons = hideButtons; // cleanup before editing table.addRowCountChangeHandler(new RowCountChangeEvent.Handler() { @Override public void onRowCountChange(RowCountChangeEvent event) { if (event.getNewRowCount() == 0 && event.isNewRowCountExact()) details.clearValues(); } }); }