/** * Append a list to the division. The list type will be inferred by the * presence and contents of labels and items. * * @param name * (Required) a local identifier used to differentiate the * element from its siblings. * @return A new List */ public List addList(String name) throws WingException { return this.addList(name, null, null); }
/** * Append a list to the division. * * @param name * (Required) a local identifier used to differentiate the * element from its siblings. * * @param type * (May be null) an optional attribute to explicitly specify the * type of list. In the absence of this attribute, the type of a * list will be inferred from the presence and content of labels * on its items. Accepted values are found at * org.dspace.app.xmlui.xmltool.List.TYPES * * @return A new List */ public List addList(String name, String type) throws WingException { return this.addList(name, type, null); }
/** * Add a submission progress list to the current div for this step. * * @param div The division to add the list to. */ public void addSubmissionProgressList(Division div) throws WingException { //each entry in progress bar is placed under this "submit-progress" div List progress = div.addList("submit-progress",List.TYPE_PROGRESS); //get Map of progress bar information //key: entry # (i.e. step & page), //value: entry name key (i.e. display name) Map<String, String> progBarInfo = this.submissionInfo.getProgressBarInfo(); //add each entry to progress bar for (Map.Entry<String, String> progBarEntry : progBarInfo.entrySet()) { //Since we are using XML-UI, we need to prepend the heading key with "xmlui.Submission." String entryNameKey = "xmlui.Submission." + progBarEntry.getValue(); //the value of entryNum is current step & page //(e.g. 1.2 is page 2 of step 1) StepAndPage currentStepAndPage = new StepAndPage(progBarEntry.getKey()); //add a button to progress bar for this step & page addJumpButton(progress, message(entryNameKey), currentStepAndPage); } }
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); } } }
findItem.setHead(T_head1); List form = findItem.addList("find-item-form", List.TYPE_FORM);
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); } }
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 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); } }
/** * 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")); }
/** * 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")); }
List form = forgot.addList("form",List.TYPE_FORM);
List form = register.addList("form",List.TYPE_FORM);
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); } }
main.setHead(T_main_head.parameterize(thisCollection.getMetadata("name"))); List options = main.addList("options",List.TYPE_SIMPLE,"horizontal"); options.addItem().addXref(baseURL+"&submit_metadata",T_options_metadata); options.addItem().addXref(baseURL+"&submit_roles",T_options_roles); List harvestSource = main.addList("harvestSource", "form");
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 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()); } }
"search",Division.METHOD_GET,"secondary search"); List queryList = query.addList("search-query",List.TYPE_FORM);
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")); } }