options.addItem().addXref(baseURL+"&submit_metadata",T_options_metadata); options.addItem().addXref(baseURL+"&submit_roles",T_options_roles); options.addItem().addHighlight("bold").addXref(baseURL+"&submit_harvesting",T_options_harvest); options.addItem().addXref(baseURL+"&submit_curate",T_options_curate); Radio source = harvestSource.addItem().addRadio("source"); source.addOption(false, "source_normal", T_source_normal); // was hc == null - always false source.addOption(true, "source_harvested", T_source_harvested); // was hc != null - always true 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; Item harvestResult = settings.addItem(); if (hc.getHarvestMessage() != null) { harvestResult.addContent(hc.getHarvestMessage() + " on " + hc.getHarvestStartTime()); harvestResult.addContent(T_harvest_result_new); 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;
CheckBox multipleTitles = form.addItem().addCheckBox("multiple_titles"); multipleTitles.setLabel(T_multiple_titles); multipleTitles.setHelp(T_multiple_titles_help); note.addHighlight("bold").addContent(T_important_note); note.addContent(T_multiple_titles_note); for (int i=0; i< titles.length; i++) note.addContent(T_separator); note.addContent("\""); note.addHighlight("bold").addContent(titles[i].value); note.addContent("\""); CheckBox publishedBefore = form.addItem().addCheckBox("published_before"); publishedBefore.setLabel(T_published_before); publishedBefore.setHelp(T_published_before_help); note.addHighlight("bold").addContent(T_important_note); note.addContent(T_published_before_note); note.addHighlight("bold").addContent(T_date_issued); note.addContent(T_open); for (int i=0; i< dateIssued.length; i++) note.addContent(T_separator); note.addContent(dateIssued[i].value);
controlsItem.addContent(T_rpp); Select rppSelect = controlsItem.addSelect("rpp"); for (int i : RESULTS_PER_PAGE_PROGRESSION) { rppSelect.addOption((i == getParameterRpp()), i, Integer.toString(i)); controlsItem.addContent(T_sort_by); Select sortSelect = controlsItem.addSelect("sort_by"); sortSelect.addOption(false, "score", T_sort_by_relevance); controlsItem.addContent(T_order); Select orderSelect = controlsItem.addSelect("order"); orderSelect.addOption(SortOption.DESCENDING.equalsIgnoreCase(parameterOrder), SortOption.DESCENDING, T_order_desc); controlsItem.addButton("submit_sort").setValue(T_sort_button);
/** * Add a disabled button with a "not allowed" notice * @param item * @param buttonName * @param buttonLabel * @throws WingException * @throws SQLException */ private void addNotAllowedButton(org.dspace.app.xmlui.wing.element.Item item, String buttonName, Message buttonLabel) throws WingException, SQLException { Button button = item.addButton(buttonName); button.setValue(buttonLabel); button.setDisabled(); item.addHighlight("fade").addContent(T_not_allowed); }
private void renderRejectPage(Division div) throws WingException { Request request = ObjectModelHelper.getRequest(objectModel); List form = div.addList("reject-workflow",List.TYPE_FORM); form.addItem(T_info2); TextArea reason = form.addItem().addTextArea("reason"); reason.setLabel(T_reason); reason.setRequired(); reason.setSize(15, 50); if (Action.getErrorFields(request).contains("reason")) reason.addError(T_reason_required); div.addHidden("page").setValue(ReviewAction.REJECT_PAGE); org.dspace.app.xmlui.wing.element.Item actions = form.addItem(); actions.addButton("submit_reject").setValue(T_submit_reject); actions.addButton("submit_cancel").setValue(T_submit_cancel); } }
Text text = list.addItem().addText("text"); text.setLabel("Text"); if (help) Text longHelp = list.addItem().addText("longHelp"); longHelp.setLabel("Long Help"); if (help) Text longError = list.addItem().addText("longError"); longError.setLabel("Long Error"); if (help) TextArea textArea = list.addItem().addTextArea("textarea"); textArea.setLabel("Text Area"); if (help) TextArea emptyTextArea = list.addItem().addTextArea("emptyTextarea"); emptyTextArea.setLabel("Empty Text Area"); if (help) Password password = list.addItem().addPassword("password"); password.setLabel("password"); if (help) Hidden hidden = list.addItem().addHidden("hidden"); hidden.setLabel("Hidden"); hidden.setValue("You can not see this."); CheckBox checkBox = list.addItem().addCheckBox("fruit");
options.addItem().addHighlight("bold").addXref(baseURL+"&submit_metadata",T_options_metadata); options.addItem().addXref(baseURL+"&submit_roles",T_options_roles); options.addItem().addXref(baseURL+"&submit_harvesting",T_options_harvest); options.addItem().addXref(baseURL+"&submit_curate",T_options_curate); Text name = metadataList.addItem().addText("name"); name.setSize(40); name.setValue(thisCollection.getMetadata("name")); Text short_description = metadataList.addItem().addText("short_description"); short_description.setValue(thisCollection.getMetadata("short_description")); short_description.setSize(40); TextArea introductory_text = metadataList.addItem().addTextArea("introductory_text"); introductory_text.setValue(thisCollection.getMetadata("introductory_text")); introductory_text.setSize(6, 40); TextArea copyright_text = metadataList.addItem().addTextArea("copyright_text"); copyright_text.setValue(thisCollection.getMetadata("copyright_text")); copyright_text.setSize(6, 40); TextArea side_bar_text = metadataList.addItem().addTextArea("side_bar_text"); side_bar_text.setValue(thisCollection.getMetadata("side_bar_text")); side_bar_text.setSize(6, 40); TextArea license = metadataList.addItem().addTextArea("license"); license.setValue(thisCollection.getMetadata("license")); license.setSize(6, 40);
Select scope = searchList.addItem().addSelect("scope"); scope.setLabel(T_search_scope); buildScopeList(scope); Text text = searchBoxItem.addText("query"); text.setValue(queryString); text.setSize(75); searchBoxItem.addButton("submit").setValue(T_go); addHiddenFormFields("search", request, fqs, mainSearchDiv); CheckBox box = item.addCheckBox("fq"); if(i == 0){ box.setLabel(T_FILTERS_SELECTED); secondarySearchList.addItem().addButton("submit_update_filters", "update-filters").setValue(T_filter_apply); Composite filterComp = item.addComposite("search-filter-controls"); filterComp.setLabel(T_add_filter); filterComp.setHelp(T_filter_help);
options.addItem().addXref(baseURL+"&submit_metadata",T_options_metadata); options.addItem().addXref(baseURL+"&submit_roles",T_options_roles); options.addItem().addHighlight("bold").addXref(baseURL+"&submit_harvesting",T_options_harvest); options.addItem().addXref(baseURL+"&submit_curate",T_options_curate); Radio source = harvestSource.addItem().addRadio("source"); source.addOption(hc == null || harvestLevelValue == -1, "source_normal", T_source_normal); source.addOption(hc != null, "source_harvested", T_source_harvested); Text oaiProvider = settings.addItem().addText("oai_provider"); oaiProvider.setSize(40); oaiProvider.setValue(oaiProviderValue); Composite oaiSetComp = settings.addItem().addComposite("oai-set-comp"); Radio oaiSetSettingRadio = oaiSetComp.addRadio("oai-set-setting"); oaiSetSettingRadio.addOption("all".equals(oaiSetIdValue) || oaiSetIdValue == null, "all", "All sets"); Select metadataFormat = settings.addItem().addSelect("metadata_format"); if (errorMap.containsKey(OAIHarvester.OAI_ORE_ERROR)) { metadataFormat.addError(errorMap.get(OAIHarvester.OAI_ORE_ERROR)); harvestButtons.addButton("submit_test").setValue(T_submit_test); Radio harvestLevel = harvestOptions.addItem().addRadio("harvest_level"); harvestLevel.addOption(harvestLevelValue == 1, 1, T_option_md_only); harvestLevel.addOption(harvestLevelValue == 2, 2, T_option_md_and_ref);
edit.addItem().addXref(fileUrl, fileName); Text bitstreamName = edit.addItem().addText("bitstreamName"); bitstreamName.setLabel(T_filename_label); bitstreamName.setHelp(T_filename_help); bitstreamName.setValue(fileName); Select primarySelect = edit.addItem().addSelect("primary"); primarySelect.setLabel(T_primary_label); primarySelect.addOption(primaryBitstream,"yes",T_primary_option_yes); primarySelect.addOption(!primaryBitstream,"no",T_primary_option_no); Text description = edit.addItem().addText("description"); description.setLabel(T_description_label); description.setHelp(T_description_help); Select format = edit.addItem().addSelect("formatID"); format.setLabel(T_format_label); Text userFormat = edit.addItem().addText("user_format"); userFormat.setLabel(T_user_label); userFormat.setHelp(T_user_help); actions.addButton("submit_save").setValue(T_submit_save); actions.addButton("submit_cancel").setValue(T_submit_cancel);
Select select = upload.addItem().addSelect("bundle"); select.setLabel(T_bundle_label); File file = upload.addItem().addFile("file"); file.setLabel(T_file_label); file.setHelp(T_file_help); Text description = upload.addItem().addText("description"); description.setLabel(T_description_label); description.setHelp(T_description_help); upload.addItem().addContent(T_no_bundles); Button button = actions.addButton("submit_upload"); button.setValue(T_submit_upload); if (bundleCount == 0) { actions.addButton("submit_cancel").setValue(T_submit_cancel);
Text email = identity.addItem().addText("email_address"); email.setRequired(); email.setLabel(T_email_address); Text firstName = identity.addItem().addText("first_name"); firstName.setRequired(); firstName.setLabel(T_first_name); Text lastName = identity.addItem().addText("last_name"); lastName.setRequired(); lastName.setLabel(T_last_name); Text phone = identity.addItem().addText("phone"); phone.setLabel(T_telephone); phone.setValue(phoneValue); CheckBox canLogInField = identity.addItem().addCheckBox("can_log_in"); canLogInField.setLabel(T_can_log_in); canLogInField.addOption(canLogInValue, "true"); CheckBox certificateField = identity.addItem().addCheckBox("certificate"); certificateField.setLabel(T_req_certs); certificateField.addOption(certificatValue,"true"); identity.addItem().addHighlight("italic").addContent(T_special_help); Item special = identity.addItem(); special.addButton("submit_reset_password").setValue(T_submit_reset_password); Button submitDelete = special.addButton("submit_delete");
Text name = form.addItem().addText("short_description"); name.setRequired(); name.setLabel(T_name); Text mimeType = form.addItem().addText("mimetype"); mimeType.setLabel(T_mimetype); mimeType.setHelp(T_mimetype_help); TextArea description = form.addItem().addTextArea("description"); description.setLabel(T_description); description.setValue(descriptionValue); description.setSize(3, 35); Select supportLevel = form.addItem().addSelect("support_level"); supportLevel.setLabel(T_support); supportLevel.setHelp(T_support_help); CheckBox internal = form.addItem().addCheckBox("internal"); internal.setLabel(T_internal); internal.setHelp(T_internal_help); internal.addOption((internalValue != null),"true"); Text extensions = form.addItem().addText("extensions"); extensions.setLabel(T_extensions); extensions.setHelp(T_extensions_help); actions.addButton("submit_save").setValue(T_submit_save); actions.addButton("submit_cancel").setValue(T_submit_cancel);
Text firstName = identity.addItem().addText("first_name"); firstName.setRequired(); firstName.setLabel(T_first_name); Text lastName = identity.addItem().addText("last_name"); lastName.setRequired(); lastName.setLabel(T_last_name); Text phone = identity.addItem().addText("phone"); phone.setLabel(T_telephone); phone.setValue(defaultPhone); Select lang = identity.addItem().addSelect("language"); lang.setLabel(T_language); if (supportedLocales.length > 0) Select subscriptions = subscribe.addItem().addSelect("subscriptions"); subscriptions.setLabel(T_email_subscriptions); subscriptions.setHelp(""); security.addItem().addContent(T_create_password_instructions); security.addItem().addContent(T_update_password_instructions); Field password = security.addItem().addPassword("password"); password.setLabel(T_password); if (registering) Field passwordConfirm = security.addItem().addPassword("password_confirm");
options.addItem().addXref(baseURL + "&submit_status", T_option_status); options.addItem().addXref(baseURL + "&submit_bitstreams", T_option_bitstreams); options.addItem().addXref(baseURL + "&submit_metadata", T_option_metadata); options.addItem().addXref(baseURL + "&view_item", T_option_view); options.addItem().addHighlight("bold").addXref(baseURL + "&submit_curate", T_option_curate); Select groupSelect = curationTaskList.addItem().addSelect("select_curate_group"); groupSelect = FlowCurationUtils.getGroupSelectOptions(groupSelect); groupSelect.setSize(1); Select taskSelect = curationTaskList.addItem().addSelect("curate_task"); taskSelect = FlowCurationUtils.getTaskSelectOptions(taskSelect, curateGroup); taskSelect.setSize(1);
defaultSize.addContent(String.valueOf(this.storeDefault.size()) + " "); defaultSize.addXref(contextPath + "/admin/panel?java=true&clearcache=true", T_COCOON_CACHE_CLEAR);
options.addItem().addXref(baseURL+"&submit_status",T_option_status); options.addItem().addXref(baseURL+"&submit_bitstreams",T_option_bitstreams); options.addItem().addHighlight("bold").addXref(baseURL+"&submit_metadata",T_option_metadata); options.addItem().addXref(baseURL + "&view_item", T_option_view); options.addItem().addXref(baseURL + "&submit_curate", T_option_curate); addForm.setHead(T_head1); Select addName = addForm.addItem().addSelect("field"); addName.setLabel(T_name_label); MetadataField[] fields = MetadataField.findAll(context); Composite addComposite = addForm.addItem().addComposite("value"); addComposite.setLabel(T_value_label); TextArea addValue = addComposite.addTextArea("value"); addLang.setSize(6); addForm.addItem().addButton("submit_add").setValue(T_submit_add);
list.addItem(T_info1); list.setHead(T_head); list.addItem().addHidden("button_required"); Select selectList = list.addItem().addSelect("licenseclass_chooser"); selectList.setLabel(T_license); selectList.setEvtBehavior("submitOnChange"); List edit = div.addList("selectlist", List.TYPE_SIMPLE, "horizontalVanilla"); edit.addItem(cclicensefield.getLabel()); edit.addItem().addFigure(contextPath + "/themes/Reference/images/information.png", "javascript:void(0)", cclicensefield.getDescription(), "information"); List subList = div.addList("sublist", List.TYPE_SIMPLE, "horizontalVanilla"); Radio radio = subList.addItem().addRadio(cclicensefield.getId() + "_chooser"); radio.setRequired(); Iterator fieldMapIterator = cclicensefield.getEnum().entrySet().iterator(); if (licenseUri != null) statusList.addItem().addXref(licenseUri, licenseUri); session.getAttribute("ccError") != null) statusList.addItem().addHighlight("error").addContent(T_ccws_error.parameterize((String)session.getAttribute("ccError"))); session.removeAttribute("ccError"); session.removeAttribute("isFieldRequired"); statusList.addItem().addHighlight("italic").addContent(T_save_changes);
harvesterControls.addLabel(T_harvest_label_status); Item status = harvesterControls.addItem(); status.addContent(HarvestScheduler.getStatus()); status.addXref(contextPath + "/admin/panel?harvest", "(refresh)"); actionsItem.addButton("submit_harvest_start").setValue(T_harvest_submit_start); actionsItem.addButton("submit_harvest_reset").setValue(T_harvest_submit_reset); actionsItem.addButton("submit_harvest_resume").setValue(T_harvest_submit_resume); actionsItem.addButton("submit_harvest_pause").setValue(T_harvest_submit_pause); actionsItem.addButton("submit_harvest_stop").setValue(T_harvest_submit_stop); java.util.List<Integer> allCollections = HarvestedCollection.findAll(context); for (Integer oaiCollection : allCollections) { allCollectionsItem.addXref(baseURL + oaiCollection, oaiCollection.toString()); java.util.List<Integer> busyCollections = HarvestedCollection.findByStatus(context, HarvestedCollection.STATUS_BUSY); for (Integer busyCollection : busyCollections) { busyCollectionsItem.addXref(baseURL + busyCollection, busyCollection.toString()); java.util.List<Integer> queuedCollections = HarvestedCollection.findByStatus(context, HarvestedCollection.STATUS_QUEUED); for (Integer queuedCollection : queuedCollections) { queuedCollectionsItem.addXref(baseURL + queuedCollection, queuedCollection.toString()); java.util.List<Integer> oaiErrors = HarvestedCollection.findByStatus(context, HarvestedCollection.STATUS_OAI_ERROR); for (Integer oaiError : oaiErrors) { oaiErrorsItem.addXref(baseURL + oaiError, oaiError.toString());