public void doActualizar() {
   // usuarioSelected.setStatus(checkEstadoUsuario.isChecked());
   usuarioSelected.setCodigoempleado(txtNumerocarne.getValue());
   usuarioSelected.setContrasena(txtClaveUsuario2.getValue());
   usuarioSelected.setNombreCompleto(txtNombreUsuario.getValue());
   usuarioSelected.setNombreusuario(txtUsuarioSistema.getValue());
   usuarioSelected.setRegistroslista(txtRegistrosLista.getValue());
   //        try {
   //            responseOperacion = usuarioBean.guardarUsuario(usuarioSelected, Boolean.FALSE);
   if (responseOperacion.getCodigoRespuesta() == Constants.CODE_OPERACION_SATISFACTORIA) {
     //                MensajeMultilinea.show("Usuario actualizado Satisfactoriamente",
     // Constants.MENSAJE_TIPO_INFO);
     //                usuarioSelected = responseOperacion.getUsuario();
     loadDataFromEntity();
     doReadOnly(Boolean.TRUE);
     doEditButton();
     listaUsuarioCtrl.refresTotalRegistros();
     listaUsuarioCtrl.refreshModel(0);
   } else {
     MensajeMultilinea.show(responseOperacion.getMensajeRespuesta(), Constants.MENSAJE_TIPO_ERROR);
   }
   //        } catch (DiservWebException bex) {
   //            bex.printStackTrace();
   //            MensajeMultilinea.show(bex.toString(), Constants.MENSAJE_TIPO_ERROR);
   //        }
   doReadOnly(Boolean.TRUE);
   doEditButton();
 }
  private void loadDataFromTextboxs() {
    try {
      usuarioSelected = new Usuarios();
      // validamos los campos
      if (StringUtils.isEmpty(txtClaveUsuario.getValue())) {
        throw new DiservWebException(
            Constants.CODE_OPERATION_FALLIDA, "Debe ingresar password valido para usuario");
      }
      if (StringUtils.isEmpty(txtClaveUsuario2.getValue())) {
        throw new DiservWebException(
            Constants.CODE_OPERATION_FALLIDA, "Debe ingresar password para usuario");
      }

      if (!txtClaveUsuario.getValue().equals(txtClaveUsuario2.getValue())) {
        throw new DiservWebException(Constants.CODE_OPERATION_FALLIDA, "Password no coincide   ");
      }
      if (StringUtils.isEmpty(txtNombreUsuario.getValue())) {
        throw new DiservWebException(
            Constants.CODE_OPERATION_FALLIDA, "Debe ingresar nombre usuarios");
      }
      if (StringUtils.isEmpty(txtUsuarioSistema.getValue())) {
        throw new DiservWebException(
            Constants.CODE_OPERATION_FALLIDA,
            "Debe ingresar  usuario con el que se conectara a sistema");
      }
      if (txtRegistrosLista.getValue() == null) {
        throw new DiservWebException(
            Constants.CODE_OPERATION_FALLIDA, "Debe ingresar cantida de registros por pagina");
      }
      // if (checkEstadoUsuario.isChecked()) {
      //  usuarioSelected.setStatus(checkEstadoUsuario.isChecked());
      usuarioSelected.setCodigoempleado(txtNumerocarne.getValue());
      usuarioSelected.setContrasena(txtClaveUsuario2.getValue());
      usuarioSelected.setNombreCompleto(txtNombreUsuario.getValue());
      usuarioSelected.setNombreusuario(txtUsuarioSistema.getValue());
      usuarioSelected.setRegistroslista(txtRegistrosLista.getValue());

    } catch (DiservWebException ex) {
      MensajeMultilinea.show(ex.getMensaje(), Constants.MENSAJE_TIPO_ERROR);
    }
  }
  /** cargamos los textboxs desde entity */
  private void loadDataFromEntity() {
    txtClaveUsuario.setValue(usuarioSelected.getContrasena());
    txtClaveUsuario2.setValue(usuarioSelected.getContrasena());
    txtNombreUsuario.setValue(usuarioSelected.getNombreCompleto());
    txtNumerocarne.setValue(usuarioSelected.getCodigoempleado());
    txtRegistrosLista.setValue(usuarioSelected.getRegistroslista());
    txtUsuarioSistema.setValue(usuarioSelected.getNombreCompleto());

    loadDataFromEntity();
    // checkEstadoUsuario.setChecked(usuarioSelected.getStatus());
  }