private void renderMainPage(Division div) throws WingException { Table table = div.addTable("workflow-actions", 1, 1); table.setHead(T_info1); // Approve task Row row = table.addRow(); row.addCellContent(T_approve_help); row.addCell().addButton("submit_approve").setValue(T_approve_submit); // Reject item row = table.addRow(); row.addCellContent(T_reject_help); row.addCell().addButton("submit_reject").setValue(T_reject_submit); // Edit metadata row = table.addRow(); row.addCellContent(T_edit_help); row.addCell().addButton("submit_edit").setValue(T_edit_submit); // Everyone can just cancel row = table.addRow(); row.addCell(0, 2).addButton("submit_leave").setValue(T_cancel_submit); div.addHidden("page").setValue(ReviewAction.MAIN_PAGE); }
/** * Add a new row to the table. The row element is contained inside a table * and serves as a container of cell elements. A required 'role' attribute * determines how the row and its cells are used. * * * @param name * (May be null) a local identifier used to differentiate the * element from its siblings. * @param role * (May be null) determine what kind of information the row * carries, either header or data. See row.ROLES * @param rend * (May be null) a rendering hint used to override the default * display of the element. * * @return a new table row */ public Row addRow(String name, String role, String rend) throws WingException { Row row = new Row(context, name, role, rend); contents.add(row); return row; }
/** * Construct a new table row. * * @param context * (Required) The context this element is contained in, such as * where to route SAX events and what i18n catalogue to use. * @param name * (May be null) a local identifier used to differentiate the * element from its siblings. * @param role * (May be null) determines what kind of information the row * carries, either header or data. See row.ROLES * @param rend * (May be null) a rendering hint used to override the default * display of the element. */ protected Row(WingContext context, String name, String role, String rend) throws WingException { super(context); restrict(role, ROLES, "The 'role' parameter must be one of these values: 'data' or 'header'."); this.name = name; this.role = role; this.rend = rend; }
/** * Add a new cell to the table. The cell element contained in a row of a * table carries content for that table. It is a character container, just * like p, item, and hi, and its primary purpose is to display textual data, * possibly enhanced with hyperlinks, emphasized blocks of text, images and * form fields. * * @return a new table cell. */ public Cell addCell() throws WingException { return addCell(null, null, 0, 0, null); }
startElement(contentHandler, namespaces, E_ROW, attributes); for (AbstractWingElement content : contents) endElement(contentHandler, namespaces, E_ROW);
header.addCellContent(T_p_column1); header.addCellContent(T_p_column2); header.addCellContent(T_p_column3); row.addCellContent(displayTitle); row.addCellContent(T_untitled); row.addCellContent(collectionName); row.addCellContent(state);
/** * Add a new cell to the table. The cell element contained in a row of a * table carries content for that table. It is a character container, just * like p, item, and hi, and its primary purpose is to display textual data, * possibly enhanced with hyperlinks, emphasized blocks of text, images and * form fields. * * @param role * (May be null) determines what kind of information the cell * carries, either header or data. See cell.ROLES * @return a new table cell. */ public Cell addCell(String role) throws WingException { return addCell(null, role, 0, 0, null); }
private void renderMainPage(Division div) throws WingException { Table table = div.addTable("workflow-actions", 1, 1); table.setHead(T_info1); // Approve task Row row = table.addRow(); row.addCellContent(T_approve_help); row.addCell().addButton("submit_approve").setValue(T_approve_submit); // Reject item row = table.addRow(); row.addCellContent(T_reject_help); row.addCell().addButton("submit_reject").setValue(T_reject_submit); // Decline task row = table.addRow(); row.addCellContent(T_decline_help); row.addCell().addButton("submit_decline_task").setValue(T_decline_submit); // Everyone can just cancel row = table.addRow(); row.addCell(0, 2).addButton("submit_leave").setValue(T_cancel_submit); div.addHidden("page").setValue(ReviewAction.MAIN_PAGE); }
/** * Add a new cell to the table. The cell element contained in a row of a * table carries content for that table. It is a character container, just * like p, item, and hi, and its primary purpose is to display textual data, * possibly enhanced with hyperlinks, emphasized blocks of text, images and * form fields. * * @param rows * (May be zero for no defined value) determines how many rows * does this cell span. * @param cols * (May be zero for no defined value) determines how many columns * does this cell span. * @return a new table cell. */ public Cell addCell(int rows, int cols) throws WingException { return addCell(null, null, rows, cols, null); }
private void renderMainPage(Division div) throws WingException { Table table = div.addTable("workflow-actions", 1, 1); table.setHead(T_info1); // Approve task Row row = table.addRow(); row.addCellContent(T_approve_help); row.addCell().addButton("submit_approve").setValue(T_approve_submit); // Reject item row = table.addRow(); row.addCellContent(T_reject_help); row.addCell().addButton("submit_reject").setValue(T_reject_submit); // Everyone can just cancel row = table.addRow(); row.addCell(0, 2).addButton("submit_leave").setValue(T_cancel_submit); div.addHidden("page").setValue(org.dspace.xmlworkflow.state.actions.processingaction.ReviewAction.MAIN_PAGE); }
/** * Add a new cell to the table. The cell element contained in a row of a * table carries content for that table. It is a character container, just * like p, item, and hi, and its primary purpose is to display textual data, * possibly enhanced with hyperlinks, emphasized blocks of text, images and * form fields. * * @param name * (May be null) a local identifier used to differentiate the * element from its siblings. * @param role * (May be null) determines what kind of information the cell * carries, either header or data. See cell.ROLES * @param rend * (May be null) a rendering hint used to override the default * display of the element. * @return a new table cell. */ public Cell addCell(String name, String role, String rend) throws WingException { return addCell(name, role, 0, 0, rend); }
private void renderMainPage(Division div) throws WingException { Table table = div.addTable("workflow-actions", 1, 1); table.setHead(T_info1); // Approve task Row row = table.addRow(); row.addCellContent(T_approve_help); row.addCell().addButton("submit_approve").setValue(T_approve_submit); // Edit metadata row = table.addRow(); row.addCellContent(T_edit_help); row.addCell().addButton("submit_edit").setValue(T_edit_submit); // Everyone can just cancel row = table.addRow(); row.addCell(0, 2).addButton("submit_leave").setValue(T_submit_cancel); div.addHidden("page").setValue(ReviewAction.MAIN_PAGE); } }
/** * Add a new cell to the table. The cell element contained in a row of a * table carries content for that table. It is a character container, just * like p, item, and hi, and its primary purpose is to display textual data, * possibly enhanced with hyperlinks, emphasized blocks of text, images and * form fields. * * Once the cell has been created set the cell's contents to the provided * content. * * @param message * (Required) Key to the i18n catalogue to translate the content * into the language preferred by the user. */ public void addCellContent(Message message) throws WingException { Cell cell = this.addCell(); cell.addContent(message); }
header.addCell().addContent(T_epeople_column1); header.addCell().addContent(T_epeople_column2); header.addCell().addContent(T_epeople_column3); header.addCell().addContent(T_epeople_column4); personData.addCell().addContent(person.getID()); personData.addCell().addXref(url, fullName); personData.addCell().addXref(url, email); personData.addCellContent(T_member); personData.addCell().addHighlight("warn").addContent(T_pending); personData.addCell().addButton("submit_add_eperson_"+epersonID).setValue(T_submit_add); table.addRow().addCell(1, 4).addContent(T_no_results);
/** * Add a new cell to the table. The cell element contained in a row of a * table carries content for that table. It is a character container, just * like p, item, and hi, and its primary purpose is to display textual data, * possibly enhanced with hyperlinks, emphasized blocks of text, images and * form fields. * * Once the cell has been created set the cell's contents to the provided * content. * * @param characters * (Required) Untranslated character data to be included. */ public void addCellContent(String characters) throws WingException { Cell cell = this.addCell(); cell.addContent(characters); }
header.addCellContent(T_c_column1); // ISSUE DATE header.addCellContent(T_c_column2); // ITEM TITLE (LINKED) header.addCellContent(T_c_column3); // COLLECTION NAME (LINKED) Cell cellDate = row.addCell(); cellDate.addContent(displayDate); row.addCell().addContent(""); if (displayTitle.length() > 50) displayTitle = displayTitle.substring(0,50)+ " ..."; row.addCell().addXref(itemUrl,displayTitle); row.addCell().addXref(itemUrl,T_untitled); row.addCell().addXref(collUrl,collectionName);
private void addXMLWorkflowRoles(Collection thisCollection, String baseURL, HashMap<String, Role> roles, Table rolesTable) throws WingException, SQLException { Row tableRow; if(roles != null){ //ROLES: show group name instead of role name for(String roleId: roles.keySet()){ Role role = roles.get(roleId); if (role.getScope() == Role.Scope.COLLECTION) { tableRow = rolesTable.addRow(Row.ROLE_DATA); tableRow.addCell(Cell.ROLE_HEADER).addContent(role.getName()); Group roleGroup = WorkflowUtils.getRoleGroup(context, thisCollection.getID(), role); if (roleGroup != null) { tableRow.addCell().addXref(baseURL + "&submit_edit_wf_role_" + roleId, roleGroup.getName()); addAdministratorOnlyButton(tableRow.addCell(), "submit_delete_wf_role_" + roleId, T_delete); } else { tableRow.addCell().addContent(T_no_role); addAdministratorOnlyButton(tableRow.addCell(), "submit_create_wf_role_" + roleId, T_create); } // help and directions row tableRow = rolesTable.addRow(Row.ROLE_DATA); tableRow.addCell(); if (role.getDescription() != null){ tableRow.addCell(1,2).addHighlight("fade offset").addContent(role.getDescription()); } } } } }
header.addCellContent(T_column1); header.addCellContent(T_column2); header.addCellContent(T_column3); row.addCell().addContent(bitstream.getName()); row.addCell().addContent(bitstream.getDescription()); row.addCell().addContent(format);
public void addBody(Body body) throws SAXException, WingException, UIException, SQLException, IOException, AuthorizeException { String error = ""; try { error = parameters.getParameter("error"); } catch (ParameterException e) { //Should not happen. assert false; } Division div = body.addDivision("error"); Table table = div.addTable("table0",2,1); table.addRow().addCell().addContent("An error has occured:"); table.addRow().addCell().addContent(error); } }
header.addCell().addContent(T_groups_column1); header.addCell().addContent(T_groups_column2); header.addCell().addContent(T_groups_column3); header.addCell().addContent(T_groups_column4); header.addCell().addContent(T_groups_column5); row.addCell().addContent(groupID); if (AuthorizeManager.isAdmin(context)) row.addCell().addXref(url, name); row.addCell().addContent(name); row.addCell().addContent(memberCount == 0 ? "-" : String.valueOf(memberCount)); Cell cell = row.addCell(); if (FlowGroupUtils.getCollectionId(group.getName()) > -1) row.addCellContent(T_member); row.addCell().addHighlight("warn").addContent(T_pending); row.addCellContent(T_cycle); row.addCell().addButton("submit_add_group_"+groupID).setValue(T_submit_add); table.addRow().addCell(1, 4).addContent(T_no_results);