예제 #1
0
 private void createPageTitleModel() {
   ptModel =
       new CCPageTitleModel(
           getClass()
               .getClassLoader()
               .getResourceAsStream("com/sun/identity/console/twoBtnsPageTitle.xml"));
   ptModel.setValue("button1", "button.add");
   ptModel.setValue("button2", "button.cancel");
 }
 private void createPageTitleModel() {
   ptModel =
       new CCPageTitleModel(
           getClass()
               .getClassLoader()
               .getResourceAsStream("com/sun/identity/console/threeBtnsPageTitle.xml"));
   ptModel.setValue("button1", "button.save");
   ptModel.setValue("button2", "button.reset");
   ptModel.setValue("button3", getBackButtonLabel());
 }
 protected void createPageTitleModel() {
   ptModel =
       new CCPageTitleModel(
           getClass()
               .getClassLoader()
               .getResourceAsStream("com/sun/identity/console/threeBtnsPageTitle.xml"));
   ptModel.setPageTitleText("saml.profile.trustedPartners.selectType.page.title");
   ptModel.setValue("button1", "button.previous");
   ptModel.setValue("button2", "button.next");
   ptModel.setValue("button3", "button.cancel");
 }
 protected void registerChildren() {
   super.registerChildren();
   registerChild(PGTITLE, CCPageTitle.class);
   ptModel.registerChildren(this);
   registerChild(PROPERTY_ATTRIBUTE, AMPropertySheet.class);
   propertySheetModel.registerChildren(this);
 }
  protected View createChild(String name) {
    View view = null;
    if (name.equals(PGTITLE)) {
      view = new CCPageTitle(this, ptModel, name);
    } else if (ptModel.isChildSupported(name)) {
      view = ptModel.createChild(this, name);
    } else if (name.equals(PROPERTY_ATTRIBUTE)) {
      view = new AMPropertySheet(this, propertySheetModel, name);
    } else if ((propertySheetModel != null) && propertySheetModel.isChildSupported(name)) {
      view = propertySheetModel.createChild(this, name, getModel());
    } else {
      view = super.createChild(name);
    }

    return view;
  }
 /**
  * Displays the advanced profile of a serer.
  *
  * @param event Display Event.
  */
 public void beginDisplay(DisplayEvent event) throws ModelControlException {
   super.beginDisplay(event);
   String serverName =
       (String) getPageSessionAttribute(ServerEditViewBeanBase.PG_ATTR_SERVER_NAME);
   ServerSiteModel model = (ServerSiteModel) getModel();
   ptModel.setPageTitleText(model.getEditServerPageTitle(serverName));
   getProperties();
 }
 protected void registerChildren() {
   super.registerChildren();
   ptModel.registerChildren(this);
   registerChild(PROPERTIES, CCTextField.class);
   registerChild(PGTITLE_THREE_BTNS, CCPageTitle.class);
   registerChild(TBL_PROPERTIES, CCActionTable.class);
   tblModel.registerChildren(this);
 }
  protected View createChild(String name) {
    View view = null;

    if (name.equals(PGTITLE_THREE_BTNS)) {
      view = new CCPageTitle(this, ptModel, name);
    } else if (name.equals(PROPERTIES)) {
      view = new CCTextField(this, name, "");
    } else if (ptModel.isChildSupported(name)) {
      view = ptModel.createChild(this, name);
    } else if (tblModel.isChildSupported(name)) {
      view = tblModel.createChild(this, name);
    } else if (name.equals(TBL_PROPERTIES)) {
      view = new CCActionTable(this, tblModel, name);
    } else {
      view = super.createChild(name);
    }
    return view;
  }
 /** Populate page title model */
 private void populatePageTitleModel(int pageMode) {
   // set page title
   switch (pageMode) {
     case MODE_ARCHIVE:
       // This case is used only in the File Details Pop Up
       pageTitleModel.setPageTitleText("fs.filedetails.editattributes.archive");
       pageTitleModel.setPageTitleHelpMessage(
           directory
               ? "fs.filedetails.editattributes.archive.dir.help"
               : "fs.filedetails.editattributes.archive.help");
       break;
     case MODE_RELEASE:
       // Switch the page title text based on where this pagelet is
       // used
       pageTitleModel.setPageTitleText("fs.filedetails.editattributes.release");
       pageTitleModel.setPageTitleHelpMessage(
           parentPage == PAGE_CRITERIA_DETAIL
               ? "fs.filedetails.editattributes.release.criteriadetails.help"
               : directory
                   ? "fs.filedetails.editattributes.release.dir.help"
                   : "fs.filedetails.editattributes.release.help");
       break;
     case MODE_STAGE:
       // Switch the page title text based on where this pagelet is
       // used
       pageTitleModel.setPageTitleText("fs.filedetails.editattributes.stage");
       pageTitleModel.setPageTitleHelpMessage(
           parentPage == PAGE_CRITERIA_DETAIL
               ? "fs.filedetails.editattributes.stage.criteriadetails.help"
               : directory
                   ? "fs.filedetails.editattributes.stage.dir.help"
                   : "fs.filedetails.editattributes.stage.help");
       break;
   }
 }
  /** createChild */
  public View createChild(String name) {
    TraceUtil.trace3("Entering");

    View child = null;

    if (name.equals(PAGE_TITLE)) {
      child = new CCPageTitle(this, pageTitleModel, name);
    } else if (pageTitleModel.isChildSupported(name)) {
      // Create child from page title model.
      child = pageTitleModel.createChild(this, name);
    } else if (name.equals(RADIO) || name.equals(SUB_RADIO)) {
      return new CCRadioButton(this, name, null);
    } else if (name.equals(PARTIAL_RELEASE)) {
      return new CCCheckBox(this, name, Boolean.toString(true), Boolean.toString(false), false);
    } else if (name.equals(PARTIAL_RELEASE_SIZE)) {
      return new CCTextField(this, name, Integer.toString(8));
    } else if (name.equals(LABEL)) {
      return new CCLabel(this, name, null);
    } else if (name.equals(ALERT)) {
      return new CCAlertInline(this, name, null);
    } else if (name.equals(SUBMIT)) {
      return new CCButton(this, name, null);
    } else if (name.equals(HELP_TEXT)) {
      return new CCStaticTextField(this, name, null);
    } else if (name.equals(RECURSIVE)) {
      return new CCCheckBox(this, name, Boolean.toString(true), Boolean.toString(false), true);
    } else if (name.equals(OVERRIDE)) {
      return new CCCheckBox(this, name, Boolean.toString(true), Boolean.toString(false), false);
    } else {
      // Error if get here
      throw new IllegalArgumentException("Invalid Child '" + name + "'");
    }

    TraceUtil.trace3("Exiting");
    return (View) child;
  }
 /** registerChildren */
 public void registerChildren() {
   TraceUtil.trace3("Entering");
   pageTitleModel.registerChildren(this);
   registerChild(PAGE_TITLE, CCPageTitle.class);
   registerChild(RADIO, CCRadioButton.class);
   registerChild(SUB_RADIO, CCRadioButton.class);
   registerChild(PARTIAL_RELEASE, CCCheckBox.class);
   registerChild(PARTIAL_RELEASE_SIZE, CCTextField.class);
   registerChild(LABEL, CCLabel.class);
   registerChild(ALERT, CCAlertInline.class);
   registerChild(SUBMIT, CCButton.class);
   registerChild(HELP_TEXT, CCStaticTextField.class);
   registerChild(RECURSIVE, CCCheckBox.class);
   registerChild(OVERRIDE, CCCheckBox.class);
   TraceUtil.trace3("Exiting");
 }