コード例 #1
0
ファイル: UICliente.java プロジェクト: jofrantoba/devol
 @Override
 public void onClick(ClickEvent event) {
   // TODO Auto-generated method stub
   if (event.getSource().equals(toolBar.getBtnNuevo())) {
     // Window.alert("ok");
     goToUICMantCliente(constants.modoNuevo());
   } else if (event.getSource().equals(toolBar.getBtnEditar())) {
     goToUICMantCliente(constants.modoEditar());
   } else if (event.getSource().equals(toolBar.getBtnEliminar())) {
     goToUICMantCliente(constants.modoEliminar());
   } else if (event.getSource().equals(toolBar.getBtnActualizar())) {
     cargarTabla();
   } else if (event.getSource().equals(btnBack)) {
     goToBack();
   } else if (event.getSource().equals(btnSelect)) {
     selecciona();
   }
 }
コード例 #2
0
ファイル: UIClienteImpl.java プロジェクト: jofrantoba/devol
 @Override
 public void goToUICMantCliente(String modo) {
   // TODO Auto-generated method stub
   if (modo.equalsIgnoreCase(constants.modoNuevo())) {
     uiHomeCliente.getUIMantCliente().setModo(modo);
     uiHomeCliente.getUIMantCliente().activarCampos();
     uiHomeCliente.getContainer().showWidget(1);
     uiHomeCliente.getUIMantCliente().refreshScroll();
   } else if (modo.equalsIgnoreCase(constants.modoEditar())) {
     ClienteProxy bean = grid.getSelectionModel().getSelectedObject();
     // Window.alert(bean.getIdCliente());
     if (bean == null) {
       // Dialogs.alert(constants.alerta(), constants.seleccioneCliente(), null);
       // Window.alert(constants.seleccioneCliente());
       Notification not = new Notification(Notification.ALERT, constants.seleccioneCliente());
       not.showPopup();
       return;
     }
     uiHomeCliente.getUIMantCliente().setModo(modo);
     uiHomeCliente.getUIMantCliente().setBean(bean);
     uiHomeCliente.getUIMantCliente().activarCampos();
     uiHomeCliente.getContainer().showWidget(1);
     uiHomeCliente.getUIMantCliente().refreshScroll();
   } else if (modo.equalsIgnoreCase(constants.modoEliminar())) {
     ClienteProxy bean = grid.getSelectionModel().getSelectedObject();
     // Window.alert(bean.getIdCliente());
     if (bean == null) {
       // Dialogs.alert(constants.alerta(),constants.seleccioneCliente(), null);
       // Window.alert(constants.seleccioneCliente());
       Notification not = new Notification(Notification.ALERT, constants.seleccioneCliente());
       not.showPopup();
       return;
     }
     uiHomeCliente.getUIMantCliente().setModo(modo);
     uiHomeCliente.getUIMantCliente().setBean(bean);
     uiHomeCliente.getUIMantCliente().activarCampos();
     uiHomeCliente.getContainer().showWidget(1);
     uiHomeCliente.getUIMantCliente().refreshScroll();
   }
 }