Ejemplo n.º 1
0
  private void isRecordCurrent() {
    ClinicalContactShortVo voCurrent = null;
    if (form.getGlobalContext().Core.getCurrentClinicalContactIsNotNull())
      voCurrent = form.getGlobalContext().Core.getCurrentClinicalContact();

    for (int i = 0; i < form.gridGait().getRows().size(); i++) {
      GaitReEducationVo voGait = form.gridGait().getRows().get(i).getValue();
      if (voCurrent != null && voGait.getClinicalContact() != null) {
        if (voGait
            .getClinicalContact()
            .getID_ClinicalContact()
            .equals(voCurrent.getID_ClinicalContact())) {
          form.getLocalContext().setUpdateCurrentRecord(new Boolean(true));
          // set colour of current record + set it expanded
          GenForm.gridGaitRow currentRow = form.gridGait().getRows().get(i);
          currentRow.setBackColor(Color.Beige);
          currentRow.setExpanded(true);
          form.gridGait().setValue(voGait);
        }
      }
      populateControls(voGait);
    }
  }
Ejemplo n.º 2
0
  protected void onGridGaitSelectionChanged() throws PresentationLogicException {
    populateControls(form.gridGait().getSelectedRow().getValue());
    ClinicalContactShortVo voClinicalContact =
        form.getGlobalContext().Core.getCurrentClinicalContact();
    GaitReEducationVo voGait = form.gridGait().getSelectedRow().getValue();
    if (voClinicalContact != null
        && voGait != null
        && voGait.getClinicalContactIsNotNull()
        && voGait.getClinicalContact().equals(voClinicalContact)) {
      updateContextMenu();
      form.btnUpdate().setVisible(true);
    } else {
      form.getContextMenus().getGenericGridUpdateItem().setVisible(false);
      form.getContextMenus().getGenericGridRemoveItem().setVisible(false);
      form.getContextMenus().getGenericGridMoveDownItem().setVisible(false);
      form.getContextMenus().getGenericGridMoveUpItem().setVisible(false);
      form.getContextMenus().getGenericGridViewItem().setVisible(false);

      form.btnUpdate().setVisible(false);
    }
  }