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

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


        }
        List fl = idiv.addList("choicesList", "form", "choices-lookup");
        fl.setHead(T_results);

        // the <select> tag, and param values
        Item selectItem = fl.addItem("select", "choices-lookup");
        Select s = selectItem.addSelect("chooser", "choices-lookup");
        s.setSize(ConfigurationManager.getIntProperty("xmlui.lookup.select.size", 12));

        // parameters for javascript
        Hidden h = selectItem.addHidden("paramField");
        h.setValue(field);
        h = selectItem.addHidden("paramValue");
        h.setValue(value);
        h = selectItem.addHidden("paramIsName");
        h.setValue(String.valueOf(isName));
        h = selectItem.addHidden("paramIsRepeating");
        h.setValue(String.valueOf(isRepeating));
        h = selectItem.addHidden("paramValueInput");
        h.setValue(valueInput);
        h = selectItem.addHidden("paramAuthorityInput");
        h.setValue(authorityInput);
        h = selectItem.addHidden("paramStart");
        h.setValue(String.valueOf(start));
        h = selectItem.addHidden("paramLimit");
        h.setValue(String.valueOf(limit));
        h = selectItem.addHidden("paramFormID");
        h.setValue(formID);
        h = selectItem.addHidden("paramConfIndicatorID");
        h.setValue(confIndicatorID);
        h = selectItem.addHidden("paramFail");
        h.setValue(T_fail);
        boolean isClosed = ChoiceAuthorityManager.getManager().isClosed(field);
        h = selectItem.addHidden("paramIsClosed");
        h.setValue(String.valueOf(isClosed));
        h = selectItem.addHidden("paramCollection");
        h.setValue(String.valueOf(collection));
        if (!isClosed)
        {
            h = selectItem.addHidden("paramNonAuthority");
            if (isFieldMessage(field, "nonauthority"))
            {
                h.setValue(getFieldMessage(field, "nonauthority"));
            }
            else
            {
                h.setValue(getFieldLabel(field, "nonauthority"));
            }
        }
        h = selectItem.addHidden("contextPath");
        h.setValue(contextPath);

        // NOTE: the "spinner" indicator image gets added in the XSLT.

        // the text input(s)
        Item ti = fl.addItem("textFields", "choices-lookup");
        Composite textItem = ti.addComposite("textFieldsComp", "choices-lookup");
        Text t1 = textItem.addText("text1", "choices-lookup");
        if (isName)
        {
            Text t2 = textItem.addText("text2", "choices-lookup");
            DCPersonName dp = new DCPersonName(value);
            t1.setValue(dp.getLastName());
            t2.setValue(dp.getFirstNames());
            if (isFieldMessage(field, "help.last"))
            {
                Message m = getFieldMessage(field, "help.last");
                t1.setLabel(m);
                t1.setHelp(m);
            }
            else
            {
                String m = getFieldLabel(field, "help.last");
                t1.setLabel(m);
                t1.setHelp(m);
            }
            if (isFieldMessage(field, "help.first"))
            {
                Message m = getFieldMessage(field, "help.first");
                t2.setLabel(m);
                t2.setHelp(m);
            }
            else
            {
                String m = getFieldLabel(field, "help.first");
                t2.setLabel(m);
                t2.setHelp(m);
            }
        }
        else
        {
            t1.setValue(value);
            if (isFieldMessage(field, "help"))
            {
                Message m = getFieldMessage(field, "help");
                t1.setLabel(m);
                t1.setHelp(m);
            }
            else
            {
                String m = getFieldLabel(field, "help");
                t1.setLabel(m);
                t1.setHelp(m);
            }
        }

        // confirmation buttons
        Item buttItem = fl.addItem("confirmation", "choices-lookup");
        Button accept = buttItem.addButton("accept", "choices-lookup");
        accept.setValue(isRepeating ? T_add : T_accept);
        Button more = buttItem.addButton("more", "choices-lookup");
        more.setValue(T_more);
        Button cancel = buttItem.addButton("cancel", "choices-lookup");
        cancel.setValue(T_cancel);
    }
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

        }
           
      settings.addItem(displayName);
     
      settings.addLabel(T_label_harvest_level);
      Item harvestLevel = settings.addItem();
      switch (harvestLevelValue) {
        case 1: harvestLevel.addContent(T_option_md_only); break;
        case 2: harvestLevel.addContent(T_option_md_and_ref); break;
        default: harvestLevel.addContent(T_option_md_and_bs); break;
      }
                 
        /* Results of the last harvesting cycle */
        if (harvestLevelValue > 0) {
          settings.addLabel(T_label_harvest_result);
          Item harvestResult = settings.addItem();
          if (hc.getHarvestMessage() != null) {
            harvestResult.addContent(hc.getHarvestMessage() + " on " + hc.getHarvestStartTime());
          }
          else {
            harvestResult.addContent(T_harvest_result_new);
          }
        }
       
        /* Current status */
        settings.addLabel(T_label_harvest_status);
      Item harvestStatus = settings.addItem();
        switch(harvestStatusValue) {
          case HarvestedCollection.STATUS_READY: harvestStatus.addContent(T_harvest_status_ready); break;
          case HarvestedCollection.STATUS_BUSY: harvestStatus.addContent(T_harvest_status_busy); break;
          case HarvestedCollection.STATUS_QUEUED: harvestStatus.addContent(T_harvest_status_queued); break;
          case HarvestedCollection.STATUS_OAI_ERROR: harvestStatus.addContent(T_harvest_status_oai_error); break;
          case HarvestedCollection.STATUS_UNKNOWN_ERROR: harvestStatus.addContent(T_harvest_status_unknown_error); break;
        }
           
        settings.addLabel();
      Item harvestButtons = settings.addItem();
      harvestButtons.addButton("submit_change").setValue(T_submit_change_settings);
      harvestButtons.addButton("submit_import_now").setValue(T_submit_import_now);
      harvestButtons.addButton("submit_reimport").setValue(T_submit_reimport_collection);
       
    Para buttonList = main.addPara();
      buttonList.addButton("submit_save").setValue(T_submit_save);
      buttonList.addButton("submit_return").setValue(T_submit_return);
     
View Full Code Here

      // the row to upload a new logo
      metadataList.addLabel(T_label_logo);
      metadataList.addItem().addFile("logo");

      // the row displaying an existing logo
      Item item;
      if (thisCollection.getLogo() != null) {
        metadataList.addLabel(T_label_existing_logo);
        item = metadataList.addItem();
                // Filename in URL is  ignored by the sitemap.  It's needed to
                // provide a format hint to the browser, since logo bitstreams
                // don't have names(!).
                item.addFigure(contextPath + "/bitstream/id/"
                        + thisCollection.getLogo().getID() + "/bob.jpg", null,
                        null);
        item.addButton("submit_delete_logo").setValue(T_submit_delete_logo);
      }
     
      // item template creation and removal
      metadataList.addLabel(T_label_item_template);
      item = metadataList.addItem();
     
      if (thisCollection.getTemplateItem() == null)
        {
            item.addButton("submit_create_template").setValue(T_submit_create_template);
        }
      else
      {
        item.addButton("submit_edit_template").setValue(T_submit_edit_template);
        item.addButton("submit_delete_template").setValue(T_submit_delete_template);
      }
     
    Para buttonList = main.addPara();
      buttonList.addButton("submit_save").setValue(T_submit_save);
        //Only System Admins can Delete Collections
View Full Code Here

        Division actions = main.addDivision("authorization-actions");
        actions.setHead(T_actions_head);

        List actionsList = actions.addList("actions");
        actionsList.addLabel(T_actions_item_lookup);
        Item actionItem = actionsList.addItem();
        Text queryField = actionItem.addText("identifier");
        queryField.setAutofocus("autofocus");
        if (query != null)
        {
            queryField.setValue(query);
        }
        if (errors.contains("identifier"))
        {
            queryField.addError(T_bad_name);
        }
        queryField.setHelp(T_search_help);
        actionItem.addButton("submit_edit").setValue(T_submit_find);
        actionsList.addLabel(T_actions_advanced);
        actionsList.addItemXref(baseURL+"&submit_wildcard", T_actions_advanced_link);

        // DIVISION: authorization-containerList
        Division containers = main.addDivision("authorization-containerList");
View Full Code Here

      // the row to upload a new logo
      metadataList.addLabel(T_label_logo);
      metadataList.addItem().addFile("logo");

      // the row displaying an existing logo
      Item item;
      if (thisCommunity.getLogo() != null) {
        metadataList.addLabel(T_label_existing_logo);
        item = metadataList.addItem();
                // Filename in URL is  ignored by the sitemap.  It's needed to
                // provide a format hint to the browser, since logo bitstreams
                // don't have names(!).
                item.addFigure(contextPath + "/bitstream/id/"
                        + thisCommunity.getLogo().getID() + "/bob.jpg", null,
                        null);
        item.addButton("submit_delete_logo").setValue(T_submit_delete_logo);
      }
     
      Para buttonList = main.addPara();
      buttonList.addButton("submit_save").setValue(T_submit_update);
View Full Code Here

            // display main store's cache info
            cocoon.addLabel(T_COCOON_MAIN_CACHE_SIZE.parameterize(storeName + ", 0x" + Integer.toHexString(this.storeDefault.hashCode())));

            // display cache size & link to clear Cocoon's main cache
            Item defaultSize = cocoon.addItem();
            defaultSize.addContent(String.valueOf(this.storeDefault.size()) + "  ");
            defaultSize.addXref(contextPath + "/admin/panel?java=true&clearcache=true", T_COCOON_CACHE_CLEAR);
        }

        // Check if we have access to Cocoon's Persistent Cache
        // Cocoon's Persistent Store may be used by the Default Cache/Store to delegate persistent storage
        // (it's an optional store which may not exist)
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.hasStatus(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.hasStatus(HarvestScheduler.HARVESTER_STATUS_PAUSED))
        {
            actionsItem.addButton("submit_harvest_resume").setValue(T_harvest_submit_resume);
        }
        if (HarvestScheduler.hasStatus(HarvestScheduler.HARVESTER_STATUS_RUNNING) ||
                    HarvestScheduler.hasStatus(HarvestScheduler.HARVESTER_STATUS_SLEEPING))
        {
            actionsItem.addButton("submit_harvest_pause").setValue(T_harvest_submit_pause);
        }
        if (!HarvestScheduler.hasStatus(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

            }



            // 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

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.