/** * 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); }
/** * 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); }
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_column1); header.addCell().addContent(T_column2); header.addCell().addContent(T_column3); header.addCell().addContent(T_column4); row.addCell().addContent(group.getID()); row.addCell().addContent(group.getName()); row.addCell().addContent(group.getMembers().length); row.addCell().addContent(group.getMemberGroups().length);
header.addCell().addContent(T_head_id); header.addCell().addContent(T_head_name); header.addCell().addContent(T_head_email); row.addCell().addContent(eperson.getID()); row.addCell().addContent(eperson.getFullName()); row.addCell().addContent(eperson.getEmail());
header.addCell().addContent(T_column1); header.addCell().addContent(T_column2); header.addCell().addContent(T_column3); row.addCell().addContent(formatID); row.addCell().addContent(mimetype); row.addCell().addContent(name);
header.addCell().addContent(T_head_id); header.addCell().addContent(T_head_action); header.addCell().addContent(T_head_group); row.addCell().addContent(policy.getID()); row.addCell().addContent(policy.getActionText()); if (policy.getGroup() != null) row.addCell().addContent(policy.getGroup().getName()); row.addCell().addContent("...");
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().addContent(fullName); personData.addCell().addContent(email);
header.addCell().addContent(T_column1); header.addCell().addContent(T_column2); header.addCell().addContent(T_column3); row.addCell().addContent(fieldID); row.addCell().addContent(fieldName.toString()); row.addCell().addContent(fieldScopeNote); cell.addContent(T_para2); Select toSchema = cell.addSelect("to_schema"); for (MetadataSchema schema : schemas)
header.addCell().addContent(T_column1); header.addCell().addContent(T_column2); header.addCell().addContent(T_column3); row.addCell().addContent(schema.getSchemaID()); row.addCell().addContent(schema.getNamespace()); row.addCell().addContent(schema.getName());
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() + ")" ); } }
Cell cell = headerRow.addCell(0 + "-" + row + "-h", Cell.ROLE_DATA, "labelcell"); cell.addContent(cLabels[row]); .addContent(dataset.getRowLabels().get(row)); Cell cell = valListRow.addCell(row + "-" + col, Cell.ROLE_DATA, "datacell"); cell.addContent(matrix[row][col]);
headerRow.addCell("", Cell.ROLE_DATA, "labelcell").addContent(message(T_head_visits_views)); catCell.addContent(dataset.getColLabels().get(col)); valCell.addContent(matrix[0][col]);
row.addCell().addContent(bitstream.getName()); row.addCell().addContent(bitstream.getDescription()); row.addCell().addContent(format);
protected void buildSearchControls(Division div) throws WingException, SQLException { Request request = ObjectModelHelper.getRequest(objectModel); Table controlsTable = div.addTable("search-controls", 1, 3); Row controlsRow = controlsTable.addRow(Row.ROLE_DATA); // Create a control for the number of records to display Cell rppCell = controlsRow.addCell(); rppCell.addContent("pagesize"); Select rppSelect = rppCell.addSelect("rpp"); for (int i : RESULTS_PER_PAGE_PROGRESSION) { rppSelect.addOption((i == getParameterRpp()), i, Integer.toString(i)); } Cell filterCell = controlsRow.addCell(); // Create a drop down of the different sort columns available int selectedCollectionId = Util.getIntParameter(request, "filter_collection"); filterCell.addContent("Collection filter:"); Select sortSelect = filterCell.addSelect("filter_collection"); sortSelect.addOption(-1 == selectedCollectionId,-1, "None"); Collection[] collections = Collection.findAll(context); for (Collection collection : collections) { sortSelect.addOption(collection.getID() == selectedCollectionId, collection.getID(), collection.getName()); } controlsRow.addCell().addButton("submit_search_controls").setValue(T_go); }
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()); } } } } }
if (policyGroup != null) { Cell groupCell = row.addCell(1,2); groupCell.addContent(policyGroup.getName()); Highlight groupHigh = groupCell.addHighlight("fade"); groupHigh.addContent(" ["); row.addCell(1,2).addContent("...");
personData.addCell().addContent(eperson.getID()); if (pendingAddition) nameCell.addContent(" "); nameCell.addHighlight("warn").addContent(T_members_pending);
nameCell.addContent(" "); nameCell.addHighlight("warn").addContent(T_members_pending); groupData.addCell().addContent("-");
Row header = table.addRow(Row.ROLE_HEADER); header.addCell(); header.addCell().addContent(T_head_id); header.addCell().addContent(T_head_action); header.addCell().addContent(T_head_group); header.addCell(); for (Bitstream bitstream : bitstreams) { subheader = table.addRow(null,Row.ROLE_HEADER,"subheader"); subheader.addCell(null, null, 1, 4, "doubleIndent").addContent(T_subhead_bitstream.parameterize(bitstream.getName(),bitstream.getID())); subheader.addCell().addXref(baseURL + "&submit_add_bitstream_" + bitstream.getID(), T_add_bitstreamPolicy_link);