Example #1
0
 public void infoTileSelectionHandler(ClientEvent clientEvent) {
   Map eventParams = clientEvent.getParameters();
   if (eventParams.containsKey(INFOTILE_EVENT_PAYLOAD)) {
     // Numerical values from JS come accross as doubles
     int selectedTile = Integer.parseInt((String) eventParams.get(INFOTILE_EVENT_PAYLOAD));
     JSFUtils.setManagedBeanValue("pageFlowScope.selectedTile", selectedTile);
     AdfFacesContext.getCurrentInstance().addPartialTarget(clientEvent.getComponent());
   }
 }
Example #2
0
  public void refresh() {
    DCBindingContainer binding =
        (DCBindingContainer) BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding it = binding.findIteratorBinding("KontragOtherView1Iterator");
    String rks;
    if (it != null) {
      try {
        rks = it.getCurrentRow().getKey().toStringFormat(true);
      } catch (Exception e) {
        rks = null;
      }
      it.executeQuery();
      if (rks != null) {
        try {
          it.setCurrentRowWithKey(rks);
        } catch (Exception e) {
          e.getMessage();
        }
      }
    }

    AdfFacesContext.getCurrentInstance().addPartialTarget(getMainTable());
  }
  /**
   * This method is action listener for select privileges drop down
   *
   * @param valueChangeEvent - object of ValueChangeEvent
   */
  public void selectPrivilegesListener(ValueChangeEvent valueChangeEvent) {
    try {
      String newValue = String.valueOf(valueChangeEvent.getNewValue());
      if (categoryIdList.contains(newValue) && newValue != CAPMETRIC_LIST_DROPDOWN_SELECT) {
        RichSelectOneChoice privilegeSelectOneChoice =
            (RichSelectOneChoice) findComponentInRoot(DEL_PRIV_UICOMP);
        FacesMessage message = new FacesMessage();
        message.setDetail(getValue("#{CommonResourceText['CATEGORY_NOT_CHOOSEN']}"));
        message.setSeverity(FacesMessage.SEVERITY_ERROR);

        // Reset resource area to default value
        FacesContext.getCurrentInstance()
            .addMessage(
                privilegeSelectOneChoice.getClientId(FacesContext.getCurrentInstance()), message);
        privilegeSelectOneChoice.setValue(0);
        privilegeSelectOneChoice.setValid(false);
        AdfFacesContext.getCurrentInstance().addPartialTarget(privilegeSelectOneChoice);
      }
      OPPE_LOG.debug("METRICS.VALUE_CHANE_EVENT_DEBUG");
    } catch (Exception exception) {
      OPPE_LOG.error("DATABASE_RETRIEVE_ERROR", exception);
      showGenericError();
    }
  }