public void beginDisplay(DisplayEvent event) throws ModelControlException {
    super.beginDisplay(event);
    if (populateValues) {
      int index = Integer.parseInt((String) getPageSessionAttribute(PGATTR_INDEX));
      List list = (List) getPageSessionAttribute("samlPropertyAttributes");
      setValues(AMPipeDelimitAttrTokenizer.getInstance().tokenizes((String) list.get(index)));
    }

    Set attributeNames = getAttributeNames();
    if (attributeNames.contains(SAMLConstants.VERSION)) {
      CCDropDownMenu menu = (CCDropDownMenu) getChild(SAMLConstants.VERSION);
      String version = (String) menu.getValue();
      if ((version == null) || (version.length() == 0)) {
        menu.setValue("1.1");
      }
    }
  }
  /**
   * override the beginReleaseOptionsTextDisplay() to keep wizard working TODO: Eventually, the new
   * criteria wizard & criteria details page should be changed to use the same scheme.
   */
  public boolean beginReleaseOptionsTextDisplay(ChildDisplayEvent event)
      throws ModelControlException {
    TraceUtil.trace3("Entering");

    int index = model.getRowIndex();
    ArchivePolCriteriaCopy[] criteriaCopies = getCriteriaCopies();

    CCDropDownMenu field = (CCDropDownMenu) getChild(RELEASE_OPTIONS);

    // determine if release options is set
    int releaseOptions = PolicyUtil.ReleaseOptions.SPACE_REQUIRED;
    if (criteriaCopies[index].isNoRelease())
      releaseOptions += PolicyUtil.ReleaseOptions.WAIT_FOR_ALL;

    if (criteriaCopies[index].isRelease()) releaseOptions += PolicyUtil.ReleaseOptions.IMMEDIATELY;

    field.setValue(Integer.toString(releaseOptions));
    TraceUtil.trace3("Exiting");

    return true;
  }
Пример #3
0
  public void beginDisplay(DisplayEvent event) throws ModelControlException {
    super.beginDisplay(event);
    SubConfigModel model = (SubConfigModel) getModel();
    String schemaName =
        (String) getPageSessionAttribute(AMServiceProfile.PG_SESSION_SUB_SCHEMA_NAME);

    if (!submitCycle) {
      AMPropertySheet ps = (AMPropertySheet) getChild(PROPERTY_ATTRIBUTE);
      propertySheetModel.clear();

      try {
        ps.setAttributeValues(model.getServiceSchemaDefaultValues(schemaName), model);
      } catch (AMConsoleException a) {
        setInlineAlertMessage(CCAlert.TYPE_WARNING, "message.warning", "noproperties.message");
      }
    }

    Set subconfigNames = model.getSelectableConfigNames(schemaName);
    if ((subconfigNames != null) && !subconfigNames.isEmpty()) {
      CCDropDownMenu menu = (CCDropDownMenu) getChild(ATTR_SUBCONFIG_NAME);
      OptionList optList = this.createOptionList(subconfigNames);
      menu.setOptions(optList);
    }
  }