/** * Add a new row to the table. The row element is contained inside a table * and serves as a container of cell elements. * * @return a new table row */ public Row addRow() throws WingException { return this.addRow(null, null, 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); }
/** * Append a table to the division. When creating a table the number of rows * and columns contained in the table must be pre computed and provided * here. * * @param name * (Required) a local identifier used to differentiate the * element from its siblings. * * @param rows * (Required) The number of rows in the table. * @param cols * (Required) The number of columns in the table. * @param rend * (May be null) a rendering hint used to override the default * display of the element. * * @return A new table. */ public Table addTable(String name, int rows, int cols, String rend) throws WingException { Table table = new Table(context, name, rows, cols, rend); contents.add(table); return table; }
/** * Set the head element which is the label associated with this table. * * @param characters * (May be null) Unprocessed characters to be included */ public void setHead(String characters) throws WingException { Head head = this.setHead(); head.addContent(characters); }
startElement(contentHandler, namespaces, E_TABLE, attributes); if (head != null) endElement(contentHandler, namespaces, E_TABLE);
/** * Set the head element which is the label associated with this table. * * @param message * (Required) A key into the i18n catalogue for translation into * the user's preferred language. */ public void setHead(Message message) throws WingException { Head head = this.setHead(); head.addContent(message); }
/** * 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 role * (May be null) determines what kind of information the row * carries, either header or data. See row.ROLES * * @return a new table row */ public Row addRow(String role) throws WingException { return this.addRow(null, role, 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); // 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); } }
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); } }
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); }
private void renderFacetField(SearchFilterParam browseParams, DSpaceObject dso, String facetField, Table singleTable, List<String> filterQueries, DiscoverResult.FacetResult value) throws SQLException, WingException, UnsupportedEncodingException { String displayedValue = value.getDisplayedValue(); String filterQuery = value.getAsFilterQuery(); // if(field.getGap() != null){ // //We have a date get the year so we can display it // DateFormat simpleDateformat = new SimpleDateFormat("yyyy"); // displayedValue = simpleDateformat.format(SolrServiceImpl.toDate(displayedValue)); // filterQuery = ClientUtils.escapeQueryChars(value.getFacetField().getName()) + ":" + displayedValue + "*"; // } Cell cell = singleTable.addRow().addCell(); //No use in selecting the same filter twice if(filterQueries.contains(filterQuery)){ cell.addContent(displayedValue + " (" + value.getCount() + ")"); } else { //Add the basics Map<String, String> urlParams = new HashMap<String, String>(); urlParams.putAll(browseParams.getCommonBrowseParams()); String url = generateURL(contextPath + (dso == null ? "" : "/handle/" + dso.getHandle()) + "/discover", urlParams); //Add already existing filter queries url = addFilterQueriesToUrl(url); //Last add the current filter query url += "&fq=" + URLEncoder.encode(filterQuery, "UTF-8"); cell.addXref(url, displayedValue + " (" + value.getCount() + ")" ); } }
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); }
Cell cell = singleTable.addRow().addCell();
Row header = table.addRow(Row.ROLE_HEADER); header.addCell().addContent(T_column1); header.addCell().addContent(T_column2); Row row = table.addRow(); row.addCell().addContent(fieldID); row.addCell().addContent(fieldName.toString()); Row row = table.addRow(); Cell cell = row.addCell(1,3); cell.addContent(T_para2);
table.setHead(T_info1); Row row = table.addRow(); row.addCellContent(T_take_help); row.addCell().addButton("submit_take_task").setValue(T_take_submit); row = table.addRow(); row.addCellContent(T_leave_help); row.addCell().addButton("submit_leave").setValue(T_leave_submit); row = table.addRow(); row.addCell(0, 2).addButton("submit_leave").setValue(T_back_overview);