@Override public List<HtmlData> getCustomActionUrls(BusinessObject businessObject, List pkNames) { List<HtmlData> customActionUrls = super.getCustomActionUrls(businessObject, pkNames); ObjectCode objectCode = (ObjectCode) businessObject; String financialObjectCode = objectCode.getFinancialObjectCode(); String chartOfAccountsCode = objectCode.getChartOfAccountsCode(); Integer universityFiscalYear = objectCode.getUniversityFiscalYear(); Properties params = new Properties(); params.put(KRADConstants.BUSINESS_OBJECT_CLASS_ATTRIBUTE, getBusinessObjectClass().getName()); params.put( KRADConstants.DISPATCH_REQUEST_PARAMETER, KRADConstants.MAINTENANCE_NEW_METHOD_TO_CALL); params.put("financialObjectCode", financialObjectCode); params.put("chartOfAccountsCode", chartOfAccountsCode); params.put("universityFiscalYear", universityFiscalYear); AnchorHtmlData viewUrl = new AnchorHtmlData( UrlFactory.parameterizeUrl(KRADConstants.INQUIRY_ACTION, params), "view"); viewUrl.setDisplayText("view"); viewUrl.setTarget(AnchorHtmlData.TARGET_BLANK); customActionUrls.add(viewUrl); return customActionUrls; }
protected AnchorHtmlData getPrintLink(String proposalNumber) { AnchorHtmlData htmlData = new AnchorHtmlData(); htmlData.setDisplayText(PRINT_LINK); Properties parameters = new Properties(); parameters.put(KRADConstants.DISPATCH_REQUEST_PARAMETER, PRINT_PROPOSAL_LOG); parameters.put(PROPOSAL_NUMBER, proposalNumber); String href = UrlFactory.parameterizeUrl(PRINT_PROPOSAL_LOG_ACTION, parameters); htmlData.setHref(href); return htmlData; }
protected AnchorHtmlData getSelectLinkForProposalCreation(ProposalLog proposalLog) { AnchorHtmlData htmlData = new AnchorHtmlData(); htmlData.setDisplayText(DISPLAY_TEXT); Properties parameters = new Properties(); parameters.put(KRADConstants.DISPATCH_REQUEST_PARAMETER, DOC_HANDLER); parameters.put(KRADConstants.PARAMETER_COMMAND, INITIATE); parameters.put(KRADConstants.DOCUMENT_TYPE_NAME, INST_PROP_DOC_NAME); parameters.put(PROPOSAL_NUMBER, proposalLog.getProposalNumber()); String href = UrlFactory.parameterizeUrl(INSTITUTIONAL_PROPOSAL_HOME_ACTION, parameters); htmlData.setHref(href); return htmlData; }
protected AnchorHtmlData getCopyLink(Award award, Boolean readOnly) { AnchorHtmlData htmlData = new AnchorHtmlData(); htmlData.setDisplayText("copy"); Properties parameters = new Properties(); parameters.put(KNSConstants.DISPATCH_REQUEST_PARAMETER, "awardActions"); parameters.put(KNSConstants.PARAMETER_COMMAND, KEWConstants.DOCSEARCH_COMMAND); parameters.put(KNSConstants.DOCUMENT_TYPE_NAME, getDocumentTypeName()); parameters.put("viewDocument", readOnly.toString()); parameters.put("docId", award.getAwardDocument().getDocumentNumber()); parameters.put("docOpenedFromAwardSearch", "true"); parameters.put("placeHolderAwardId", award.getAwardId().toString()); String href = UrlFactory.parameterizeUrl("../" + getHtmlAction(), parameters); htmlData.setHref(href); return htmlData; }