Package org.dspace.app.xmlui.wing.element

Examples of org.dspace.app.xmlui.wing.element.Item


        int i = 1;
        String field = SearchUtils.getConfig().getString("solr.search.filter.type." + i, null);
        if (field != null) {
            //We have at least one filter so add our filter box
            Item item = topSearchList.addItem("search-filter-list", "search-filter-list");
            Composite filterComp = item.addComposite("search-filter-controls");
            filterComp.setLabel(T_FILTER_HEAD);
            filterComp.setHelp(T_FILTER_HELP);

//            filterComp.setLabel("");
View Full Code Here


    restrictsessions.setOptionSelected(SystemwideAlerts.getRestrictSessions());
   
    form.addItem(T_alerts_session_note);
   
   
    Item actions = form.addItem();
    actions.addButton("submit_activate").setValue(T_alerts_submit_activate);
    actions.addButton("submit_deactivate").setValue(T_alerts_submit_deactivate);
   
  }
View Full Code Here

    div.addHidden("harvest").setValue("true");
           
    List harvesterControls = div.addList("oai-harvester-controls",List.TYPE_FORM);
    harvesterControls.setHead(T_harvest_scheduler_head);
    harvesterControls.addLabel(T_harvest_label_status);
    Item status = harvesterControls.addItem();
    status.addContent(HarvestScheduler.getStatus());
    status.addXref(contextPath + "/admin/panel?harvest", "(refresh)");
   
    harvesterControls.addLabel(T_harvest_label_actions);
    Item actionsItem = harvesterControls.addItem();
    if (HarvestScheduler.status == HarvestScheduler.HARVESTER_STATUS_STOPPED) {
      actionsItem.addButton("submit_harvest_start").setValue(T_harvest_submit_start);
      actionsItem.addButton("submit_harvest_reset").setValue(T_harvest_submit_reset);
    }
    if (HarvestScheduler.status == HarvestScheduler.HARVESTER_STATUS_PAUSED)
      actionsItem.addButton("submit_harvest_resume").setValue(T_harvest_submit_resume);
    if (HarvestScheduler.status == HarvestScheduler.HARVESTER_STATUS_RUNNING ||
        HarvestScheduler.status == HarvestScheduler.HARVESTER_STATUS_SLEEPING)
      actionsItem.addButton("submit_harvest_pause").setValue(T_harvest_submit_pause);
    if (HarvestScheduler.status != HarvestScheduler.HARVESTER_STATUS_STOPPED)
      actionsItem.addButton("submit_harvest_stop").setValue(T_harvest_submit_stop);
   
    // Can be retrieved via "{context-path}/admin/collection?collectionID={id}"
    String baseURL = contextPath + "/admin/collection?collectionID=";
   
    harvesterControls.addLabel(T_harvest_label_collections);
    Item allCollectionsItem = harvesterControls.addItem();
    java.util.List<Integer> allCollections =  HarvestedCollection.findAll(context);
    for (Integer oaiCollection : allCollections) {
      allCollectionsItem.addXref(baseURL + oaiCollection, oaiCollection.toString());
    }
    harvesterControls.addLabel(T_harvest_label_active);
    Item busyCollectionsItem = harvesterControls.addItem();
    java.util.List<Integer> busyCollections =  HarvestedCollection.findByStatus(context, HarvestedCollection.STATUS_BUSY);
    for (Integer busyCollection : busyCollections) {
      busyCollectionsItem.addXref(baseURL + busyCollection, busyCollection.toString());
    }
    harvesterControls.addLabel(T_harvest_label_queued);
    Item queuedCollectionsItem = harvesterControls.addItem();
    java.util.List<Integer> queuedCollections =  HarvestedCollection.findByStatus(context, HarvestedCollection.STATUS_QUEUED);
    for (Integer queuedCollection : queuedCollections) {
      queuedCollectionsItem.addXref(baseURL + queuedCollection, queuedCollection.toString());
    }
    harvesterControls.addLabel(T_harvest_label_oai_errors);
    Item oaiErrorsItem = harvesterControls.addItem();
    java.util.List<Integer> oaiErrors =  HarvestedCollection.findByStatus(context, HarvestedCollection.STATUS_OAI_ERROR);
    for (Integer oaiError : oaiErrors) {
      oaiErrorsItem.addXref(baseURL + oaiError, oaiError.toString());
    }
    harvesterControls.addLabel(T_harvest_label_internal_errors);
    Item internalErrorsItem = harvesterControls.addItem();
    java.util.List<Integer> internalErrors =  HarvestedCollection.findByStatus(context, HarvestedCollection.STATUS_UNKNOWN_ERROR);
    for (Integer internalError : internalErrors) {
      internalErrorsItem.addXref(baseURL + internalError, internalError.toString());
    }
   
    // OAI Generator settings
    List generatorSettings = div.addList("oai-generator-settings");
    generatorSettings.setHead(T_harvest_head_generator_settings);
View Full Code Here

        text.addInstance().setValue("2003");
        text.addInstance().setValue("2004");
        text.addInstance().setValue("2005");
       
        // Buttons one typical finds at the end of forums
        Item actions = list.addItem();
        actions.addButton("submit_save").setValue("Save");
        actions.addButton("submit_cancel").setValue("Cancel");
  }
View Full Code Here

          
           form.addLabel(T_reset_password_for);
           form.addItem(this.email);
          
           form.addLabel();
           Item submit = form.addItem();
           submit.addButton("submit_forgot").setValue(T_submit_reset);
          
           exists.addHidden("email").setValue(this.email);
           exists.addHidden("eperson-continue").setValue(knot.getId());
       }
      
      
       Division register = body.addInteractiveDivision("register",
               contextPath+"/register",Division.METHOD_POST,"primary");
      
       register.setHead(T_head2);
      
       EPersonUtils.registrationProgressList(register,1);
      
       register.addPara(T_para2);
      
       List form = register.addList("form",List.TYPE_FORM);
      
       Text email = form.addItem().addText("email");
       email.setRequired();
       email.setLabel(T_email_address);
       email.setHelp(T_email_address_help);
       email.setValue(this.email);
       if (errors.contains("email"))
           email.addError(T_error_bad_email);
      
       Item submit = form.addItem();
       submit.addButton("submit").setValue(T_submit_register);
      
       register.addHidden("eperson-continue").setValue(knot.getId());
   }
View Full Code Here

   
    if (bundleCount == 0)
      upload.addItem().addContent(T_no_bundles);
   
    // ITEM: actions
    Item actions = upload.addItem();
    Button button = actions.addButton("submit_upload");
    button.setValue(T_submit_upload);
    if (bundleCount == 0)
      button.setDisabled();
   
    actions.addButton("submit_cancel").setValue(T_submit_cancel);

    div.addHidden("administrative-continue").setValue(knot.getId());
 
View Full Code Here

                                    request.getQueryString() == null ? ""
                                            : ("?" + request.getQueryString()));
                    loginURL = location.toString();
                }

                final Item item = list.addItem();
                item.addXref(loginURL, message(authTitle));
            }

    }
  }
View Full Code Here

        if (error)
          text.addError("The day is in error.");
        text.setSize(4,2);
       
        // Buttons one typical finds at the end of forums
        Item actions = list.addItem();
        actions.addButton("submit_save").setValue("Save");
        actions.addButton("submit_cancel").setValue("Cancel");
       
       
       
       
        /////////////////////////////////////////////////
        /// Multi section
        ////////////////////////////////////////////////
       
        div.addPara("This next test will use form sections. Sections are logical groupings of related fields that together form the entire set.");
       
        list = div.addList("sectionTest",List.TYPE_FORM);
        list.setHead("Multi-Section form");
        List identity = list.addList("identity",List.TYPE_FORM);
        identity.setHead("Identity");
       
        Text name = identity.addItem().addText("name");
        name.setLabel("Username");
        if (help)
          name.setHelp("The username you wish to chooose");
        if (error)
          name.addError("Sorry, that username is allready used by another user.");
       
        Composite ssn = identity.addItem().addComposite("ssn");
        ssn.setLabel("SSN");
        if (help)
          ssn.setHelp("Your Social Security Number, really we won't use it for anything bad.... you can trust me.");
        if (error)
          ssn.addError("The SSN you entered is invalid.");
        Text ssn1 = ssn.addText("ssn1");
        ssn1.setSize(4,4);
        Text ssn2 = ssn.addText("ssn2");
        ssn2.setSize(2,2);
        Text ssn3 = ssn.addText("ssn3");
        ssn3.setSize(4,4);
       
        List intrests = list.addList("intrests",List.TYPE_FORM);
        intrests.setHead("Intrests");
       
        CheckBox intrest = intrests.addItem().addCheckBox("intrests");
        intrest.setLabel("Intrests");
        if (help)
          intrest.setHelp("Select all topics which are of intrests to you.");
        if (error)
          intrest.addError("You're intrests are in error?");
        intrest.addOption("DL","Digital Libraries");
        intrest.addOption("HT","Hypertexts");
        intrest.addOption("IM","Information Managment");
        intrest.addOption("ID","Information Discovery");
        intrest.addOption("SI","Social Impact");
       
        List affiliation = list.addList("affiliation",List.TYPE_FORM);
        affiliation.setHead("Affiliation");
       
        Text institution = affiliation.addItem().addText("institution");
        institution.setLabel("Institution");
        if (help)
          name.setHelp("The institution you are affiliated with");
        if (error)
          name.addError("That institution is an invalid option.");
       
        Radio geography = affiliation.addItem().addRadio("geography");
        geography.setLabel("Geography");
        if (help)
          geography.setHelp("Select your institution's geographical region");
        if (error)
          geography.addError("Your entry is invalid.");
        geography.addOption("na","North America");
        geography.addOption("sa","South America");
        geography.addOption("eu","Europe");
        geography.addOption("af","Africa");
        geography.addOption("ai","Asia");
        geography.addOption("pi","Pacific Island")
        geography.addOption("an","Antarctica");
       
        Item buttons = list.addItem();
        buttons.addButton("submit_save2").setValue("Save");
        buttons.addButton("submit_cancel2").setValue("Cancel");
    }
View Full Code Here

    if (previousUserName != null) {
      email.setValue(previousUserName);
      email.addError(T_error_bad_login);
    }

    Item item = list.addItem();
    Password password = item.addPassword("ldap_password");
    password.setRequired();
    password.setLabel(T_password);

    list.addLabel();
    Item submit = list.addItem("login-in", null);
    submit.addButton("submit").setValue(T_submit);

  }
View Full Code Here

     *          The List which will contain all control buttons
     */
    public void addControlButtons(List controls)
        throws WingException
    {
        Item actions = controls.addItem();
       
        //only have "<-Previous" button if not first step
        if(!isFirstStep())
            actions.addButton(AbstractProcessingStep.PREVIOUS_BUTTON).setValue(T_previous);
       
        //always show "Save/Cancel"
        actions.addButton(AbstractProcessingStep.CANCEL_BUTTON).setValue(T_save);
       
        //If last step, show "Complete Submission"
        if(isLastStep())
            actions.addButton(AbstractProcessingStep.NEXT_BUTTON).setValue(T_complete);
        else //otherwise, show "Next->"
            actions.addButton(AbstractProcessingStep.NEXT_BUTTON).setValue(T_next);
    }
View Full Code Here

TOP

Related Classes of org.dspace.app.xmlui.wing.element.Item

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.