Exemplo n.º 1
0
 public UserListWidget(boolean enableActionDelete) {
   this.enableActionDelete = enableActionDelete;
   FlowPanel mainPanel = new AdvanceVerticalPanel();
   mainPanel.add(initTopToolbar());
   FlowPanel userListPanel = new FlowPanel();
   mainPanel.add(userListPanel);
   dataGrid = new DataGrid();
   userListPanel.add(dataGrid);
   dataGrid.addColumn("id", "", true, false).addColumn("name", "Nom", false, true, "90%");
   if (enableActionDelete) {
     dataGrid.addColumn("delete", "Supprimer", false, false, "10%");
   }
   dataSource = new DataSource();
   dataGrid.setDataSource(dataSource);
   initWidget(mainPanel);
 }
Exemplo n.º 2
0
 public void addSelectedRowListener(DataGridSelectRowListener dataGridSelectRowListener) {
   if (dataGrid != null) {
     dataGrid.addSelectRowListener(dataGridSelectRowListener);
   }
 }