Package org.openswing.swing.table.java

Examples of org.openswing.swing.table.java.ServerGridDataLocator


      col.setColumnFilterable(true);
      col.setColumnSortable(false);
      grid.getColumnContainer().add(col);
    }

    ServerGridDataLocator gridDataLocator = new ServerGridDataLocator();
    ExportButton exportButton = new ExportButton();
    saveButton.setExecuteAsThread(true);
    grid.setValueObjectClassName("org.openswing.swing.customvo.java.CustomValueObject");

    buttonsPanel.setLayout(flowLayout1);
    flowLayout1.setAlignment(FlowLayout.LEFT);
    grid.setEditButton(editButton);
    grid.setExportButton(exportButton);
    grid.setFunctionId("SYS10");
    grid.setAllowColumnsProfile(false);
    grid.setMaxSortedColumns(3);
    grid.setReloadButton(reloadButton);
    grid.setSaveButton(saveButton);

    buttonsPanel.add(editButton, null);
    buttonsPanel.add(saveButton, null);
    buttonsPanel.add(reloadButton, null);
    buttonsPanel.add(exportButton, null);

    grid.setController(new GridController() {

      /**
       * Method invoked when the user has clicked on save button and the grid is in EDIT mode.
       * @param rowNumbers row indexes related to the changed rows
       * @param oldPersistentObjects old value objects, previous the changes
       * @param persistentObjects value objects relatied to the changed rows
       * @return an ErrorResponse value object in case of errors, VOListResponse if the operation is successfully completed
       */
      public Response updateRecords(int[] rowNumbers,ArrayList oldPersistentObjects,ArrayList persistentObjects) throws Exception {
        return ClientUtils.getData("updateTranslations",new Object[]{controlCompaniesCombo.getValue(),controlTopic.getValue(),oldPersistentObjects,persistentObjects});
      }

    });
    grid.setGridDataLocator(gridDataLocator);
    gridDataLocator.setServerMethodName("loadTranslations");

    topPanel.add(buttonsPanel,     new GridBagConstraints(0, 1, 1, 1, 1.0, 0.0
            ,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));

    this.getContentPane().add(grid, BorderLayout.CENTER);
View Full Code Here


      });


      // set grid's data locator...
      if (serverGridMethodName!=null && !serverGridMethodName.equals("")) {
        ServerGridDataLocator gridDataLocator = new ServerGridDataLocator();
        gridDataLocator.setServerMethodName(serverGridMethodName);
        grid.setGridDataLocator(gridDataLocator);
      }
      else
        grid.setGridDataLocator(new GridDataLocator() {
View Full Code Here

TOP

Related Classes of org.openswing.swing.table.java.ServerGridDataLocator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.