/** * Add an empty unnamed item. * * @return a new Item */ public Item addItem() throws WingException { return addItem(null,null); }
/** * Add an item to the list that contains a link. The link will consist of * the given content and linked to the given target. * * @param target * (Required) The link target. * @param key * (Required) i18n key for translating content into the user's * preferred language. */ public void addItemXref(String target, Message key) throws WingException { Item item = this.addItem(null, null); item.addXref(target, key); }
/** * Add an item to the list that contains a link. The link will consist of * the given content and linked to the given target. * * @param target * (Required) The link target. * @param characters * (Required) Untranslated character data to be included as the * link's body. */ public void addItemXref(String target, String characters) throws WingException { Item item = this.addItem(null, null); item.addXref(target, characters); }
/** * Add an item element that contains only translated content. * * @param key * (Required) Key to the i18n catalogue to translate the content * into the language preferred by the user. */ public void addItem(Message key) throws WingException { require(key, "The 'key' parameter is required for list items."); Item item = this.addItem(null, null); item.addContent(key); }
/** * Add an item element that contains only character content. * * @param characters * (Required) Untranslated character data to be included. */ public void addItem(String characters) throws WingException { require(characters, "The 'characters' parameter is required for list items."); Item item = this.addItem(null, null); item.addContent(characters); }
private void addViewMoreUrl(List facet, DSpaceObject dso, Request request, String fieldName) throws WingException { String parameters = retrieveParameters(request); facet.addItem().addXref( contextPath + (dso == null ? "" : "/handle/" + dso.getHandle()) + "/search-filter?" + parameters + BrowseFacet.FACET_FIELD + "=" + fieldName, T_VIEW_MORE ); }
/** * Create a progress list for the forgot password workflow. * * @param form The division of the current workflow step * @param step The current step of the workflow (-1 if no step) */ public static void forgottProgressList(Division form, int step) throws WingException { List progress = form.addList("forgot-password-progress", List.TYPE_PROGRESS); progress.addItem("forgot-verify-email", render(step, 1)).addContent( new Message("default","xmlui.EPerson.EPersonUtils.forgot_verify_email")); progress.addItem("forgot-reset-passowrd", render(step, 2)).addContent( new Message("default","xmlui.EPerson.EPersonUtils.forgot_reset_password")); progress.addItem("forgot-finished", render(step, 3)).addContent( new Message("default","xmlui.EPerson.EPersonUtils.forgot_finished")); }
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); } }
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); } }
/** * Create a progress list for the registration workflow. * * @param form The division of the current workflow step. * @param step The current step of the workflow (-1 if no step) * */ public static void registrationProgressList(Division form, int step) throws WingException { List progress = form.addList("registration-progress", List.TYPE_PROGRESS); new Message("default","xmlui.EPerson.EPersonUtils.register_verify_email"); progress.addItem("register-verify-email", render(step, 1)).addContent( new Message("default","xmlui.EPerson.EPersonUtils.register_verify_email")); progress.addItem("register-create-profile", render(step, 2)).addContent( new Message("default","xmlui.EPerson.EPersonUtils.register_create_profile")); progress.addItem("register-finished", render(step, 3)).addContent( new Message("default","xmlui.EPerson.EPersonUtils.register_finished")); }
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(org.dspace.xmlworkflow.state.actions.processingaction.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); } }
public void addBody(Body body) throws WingException, SQLException, AuthorizeException { int communityID = parameters.getParameterAsInteger("communityID", -1); Community thisCommunity = Community.find(context, communityID); // DIVISION: main Division main = body.addInteractiveDivision("community-confirm-delete",contextPath+"/admin/community",Division.METHOD_POST,"primary administrative community"); main.setHead(T_main_head.parameterize(communityID)); main.addPara(T_main_para.parameterize(thisCommunity.getMetadata("name"))); List deleteConfirmHelp = main.addList("consequences",List.TYPE_BULLETED); deleteConfirmHelp.addItem(T_confirm_item1); deleteConfirmHelp.addItem(T_confirm_item2); deleteConfirmHelp.addItem(T_confirm_item3); deleteConfirmHelp.addItem(T_confirm_item4); Para buttonList = main.addPara(); buttonList.addButton("submit_confirm").setValue(T_submit_confirm); buttonList.addButton("submit_cancel").setValue(T_submit_cancel); main.addHidden("administrative-continue").setValue(knot.getId()); } }
public void addBody(Body body) throws SAXException, WingException, UIException, SQLException, IOException, AuthorizeException { Division contact = body.addDivision("contact","primary"); contact.setHead(T_head); String name = ConfigurationManager.getProperty("dspace.name"); contact.addPara(T_para1.parameterize(name)); List list = contact.addList("contact"); list.addLabel(T_feedback_label); list.addItem().addXref(contextPath+"/feedback",T_feedback_link); list.addLabel(T_email); String email = ConfigurationManager.getProperty("mail.admin"); list.addItem().addXref("mailto:"+email,email); } }
form.addItem(email); Field password = form.addItem().addPassword("password"); password.setRequired(); password.setLabel(T_new_password); Field passwordConfirm = form.addItem().addPassword("password_confirm"); passwordConfirm.setRequired(); passwordConfirm.setLabel(T_confirm_password); form.addItem().addButton("submit").setValue(T_submit);
public void addBody(Body body) throws WingException, SQLException, AuthorizeException { int collectionID = parameters.getParameterAsInteger("collectionID", -1); Collection thisCollection = Collection.find(context, collectionID); // DIVISION: main Division main = body.addInteractiveDivision("collection-confirm-delete",contextPath+"/admin/collection",Division.METHOD_POST,"primary administrative collection"); main.setHead(T_main_head.parameterize(collectionID)); main.addPara(T_main_para.parameterize(thisCollection.getMetadata("name"))); List deleteConfirmHelp = main.addList("consequences",List.TYPE_BULLETED); deleteConfirmHelp.addItem(T_confirm_item1); deleteConfirmHelp.addItem(T_confirm_item2); deleteConfirmHelp.addItem(T_confirm_item3); Para buttonList = main.addPara(); buttonList.addButton("submit_confirm").setValue(T_submit_confirm); buttonList.addButton("submit_cancel").setValue(T_submit_cancel); main.addHidden("administrative-continue").setValue(knot.getId()); } }
public void addBody(Body body) throws SAXException, WingException, UIException, SQLException, IOException, AuthorizeException { Division main = body.addDivision("export_main"); main.setHead(T_main_head); if (message != null) { main.addDivision("success", "success").addPara(message); } if (errors.size() > 0) { Division errors = main.addDivision("export-errors", "error"); for (Message error : this.errors) { errors.addPara(error); } } if (availableExports != null && availableExports.size() > 0) { Division avail = main.addDivision("available-exports", "available-exports"); avail.setHead(T_avail_head); List fileList = avail.addList("available-files", List.TYPE_ORDERED); for (String fileName : availableExports) { fileList.addItem().addXref( this.contextPath + "/exportdownload/" + fileName, fileName); } } }
public void addBody(Body body) throws SAXException, WingException, UIException, SQLException, IOException, AuthorizeException { // Build the item viewer division. Division feedback = body.addInteractiveDivision("feedback-form", contextPath+"/feedback",Division.METHOD_POST,"primary"); feedback.setHead(T_head); feedback.addPara(T_para1); List form = feedback.addList("form",List.TYPE_FORM); Text email = form.addItem().addText("email"); email.setLabel(T_email); email.setHelp(T_email_help); email.setValue(parameters.getParameter("email","")); TextArea comments = form.addItem().addTextArea("comments"); comments.setLabel(T_comments); comments.setValue(parameters.getParameter("comments","")); form.addItem().addButton("submit").setValue(T_submit); feedback.addHidden("page").setValue(parameters.getParameter("page","unknown")); } }
public void addBody(Body body) throws SAXException, WingException, UIException, SQLException, IOException, AuthorizeException { Collection collection = submission.getCollection(); String actionURL = contextPath + "/handle/"+collection.getHandle() + "/submit/" + knot.getId() + ".continue"; Division div = body.addInteractiveDivision("submit-save-or-cancel",actionURL, Division.METHOD_POST,"primary submission"); div.setHead(T_submission_head); addSubmissionProgressList(div); List saveOrCancel = div.addList("submit-review", List.TYPE_FORM); saveOrCancel.setHead(T_head); saveOrCancel.addItem(T_info1); org.dspace.app.xmlui.wing.element.Item actions = saveOrCancel.addItem(); actions.addButton("submit_back").setValue(T_submit_back); actions.addButton("submit_save").setValue(T_submit_save); actions.addButton("submit_remove").setValue(T_submit_remove); } }