private XmlWorkflowItem retrieveWorkflowItem(Request request, Context context) throws SQLException, AuthorizeException, IOException { int workflowItemId = Util.getIntParameter(request, "wfiId"); return XmlWorkflowItem.find(context, workflowItemId); } }
private String getPreviousPageURL(SearchFilterParam browseParams, Request request) { //If our offset should be 0 then we shouldn't be able to view a previous page url if (0 == queryArgs.getFacetOffset() && Util.getIntParameter(request, "offset") == -1) { return null; } int offset = Util.getIntParameter(request, SearchFilterParam.OFFSET); if(offset == -1 || offset == 0) { return null; } Map<String, String> parameters = new HashMap<String, String>(); parameters.putAll(browseParams.getCommonBrowseParams()); parameters.putAll(browseParams.getControlParameters()); parameters.put(SearchFilterParam.OFFSET, String.valueOf(offset - DEFAULT_PAGE_SIZE)); //TODO: correct comm/collection url // Add the filter queries String url = generateURL("search-filter", parameters); url = addFilterQueriesToUrl(url); return url; }
private String getNextPageURL(SearchFilterParam browseParams, Request request) { int offSet = Util.getIntParameter(request, SearchFilterParam.OFFSET); if (offSet == -1) { offSet = 0; } Map<String, String> parameters = new HashMap<String, String>(); parameters.putAll(browseParams.getCommonBrowseParams()); parameters.putAll(browseParams.getControlParameters()); parameters.put(SearchFilterParam.OFFSET, String.valueOf(offSet + DEFAULT_PAGE_SIZE)); //TODO: correct comm/collection url // Add the filter queries String url = generateURL("search-filter", parameters); url = addFilterQueriesToUrl(url); return url; }
@Override public ActionResult execute(Context c, XmlWorkflowItem wfi, Step step, HttpServletRequest request) throws SQLException, AuthorizeException, IOException { int page = Util.getIntParameter(request, "page"); switch (page) { case MAIN_PAGE: return processMainPage(c, wfi, step, request); case REJECT_PAGE: return processRejectPage(c, wfi, step, request); default: return new ActionResult(ActionResult.TYPE.TYPE_CANCEL); } }
@Override public ActionResult execute(Context c, XmlWorkflowItem wfi, Step step, HttpServletRequest request) throws SQLException, AuthorizeException, IOException { int page = Util.getIntParameter(request, "page"); switch (page) { case MAIN_PAGE: return processMainPage(c, wfi, step, request); case REJECT_PAGE: return processRejectPage(c, wfi, step, request); default: return new ActionResult(ActionResult.TYPE.TYPE_CANCEL); } }
@Override public ActionResult execute(Context c, XmlWorkflowItem wfi, Step step, HttpServletRequest request) throws SQLException, AuthorizeException, IOException { int page = Util.getIntParameter(request, "page"); switch (page) { case MAIN_PAGE: return processMainPage(c, wfi, step, request); case REJECT_PAGE: return processRejectPage(c, wfi, step, request); default: return new ActionResult(ActionResult.TYPE.TYPE_CANCEL); } }
@Override public ActionResult execute(Context c, XmlWorkflowItem wfi, Step step, HttpServletRequest request) throws SQLException, AuthorizeException, IOException, WorkflowException { if (request.getParameter("submit_score") != null) { int score = Util.getIntParameter(request, "score"); //Add our score to the metadata itemService.addMetadata(c, wfi.getItem(), WorkflowRequirementsService.WORKFLOW_SCHEMA, "score", null, null, String.valueOf(score)); itemService.update(c, wfi.getItem()); return new ActionResult(ActionResult.TYPE.TYPE_OUTCOME, ActionResult.OUTCOME_COMPLETE); } else { //We have pressed the leave button so return to our submission page return new ActionResult(ActionResult.TYPE.TYPE_SUBMISSION_PAGE); } } }
int page = Util.getIntParameter(request, "result-page"); if (page == -1) { page = 0;
int start = Util.getIntParameter(request, "start"); int rpp = Util.getIntParameter(request, "rpp"); int sort = Util.getIntParameter(request, "sort_by"); String order = request.getParameter("order"); String sortOrder = (order == null || order.length() == 0 || order.toLowerCase().startsWith("asc")) ?
int order = Util.getIntParameter(request, "order_" + bitstream.getID());
int order = Util.getIntParameter(request, "order_" + bitstream.getID());
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); }
try { Request request = ObjectModelHelper.getRequest(objectModel); int collectionIdFilter = Util.getIntParameter(request, "filter_collection");