• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java Column类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.kuali.rice.kns.web.ui.Column的典型用法代码示例。如果您正苦于以下问题:Java Column类的具体用法?Java Column怎么用?Java Column使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Column类属于org.kuali.rice.kns.web.ui包,在下文中一共展示了Column类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: getColumns

import org.kuali.rice.kns.web.ui.Column; //导入依赖的package包/类
@Override
public List<Column> getColumns() {
    List<Column> columns = new ArrayList<Column>();
    for (Row row : this.getRows()) {
        for (Field field : row.getFields()) {
            Column newColumn = new Column();
            newColumn.setColumnTitle(field.getFieldLabel());
            newColumn.setMaxLength(field.getMaxLength());
            newColumn.setPropertyName(field.getPropertyName());
            columns.add(newColumn);

        }

    }

    return columns;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:18,代码来源:AbstractRuleLookupableHelperServiceImpl.java


示例2: performLookup

import org.kuali.rice.kns.web.ui.Column; //导入依赖的package包/类
/**
 * Using default results, add columnAnchor link for reference financial document number to open document
 * 
 * @param lookupForm
 * @param kualiLookupable
 * @param resultTable
 * @param bounded
 * @return
 * 
 * KRAD Conversion: Lookupable performing customization of columns of the display list.
 */
@Override
public Collection performLookup(LookupForm lookupForm, Collection resultTable, boolean bounded) {
    Collection displayList = super.performLookup(lookupForm, resultTable, bounded);
    for (ResultRow row : (Collection<ResultRow>)resultTable) {
        for (Column col : row.getColumns()) {
            if (StringUtils.equals("referenceFinancialDocumentNumber", col.getPropertyName()) && StringUtils.isNotBlank(col.getPropertyValue())) {
                String propertyURL = SpringContext.getBean(ConfigurationService.class).getPropertyValueAsString(OLEConstants.WORKFLOW_URL_KEY) + "/DocHandler.do?docId=" + col.getPropertyValue() + "&command=displayDocSearchView";
                AnchorHtmlData htmlData = new AnchorHtmlData(propertyURL, "", col.getPropertyValue());
                htmlData.setTitle(col.getPropertyValue());
                col.setColumnAnchor(htmlData);
            }
        }
    }
    return displayList;
}
 
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:27,代码来源:ElectronicPaymentClaimLookupableHelperServiceImpl.java


示例3: getColumns

import org.kuali.rice.kns.web.ui.Column; //导入依赖的package包/类
/**
 * @see org.kuali.rice.kns.lookup.AbstractLookupableHelperServiceImpl#getColumns()
 */
@Override
public List<Column> getColumns() {
    List<Column> columns =  super.getColumns();
    
    String offsetParmValue = parameterService.getParameterValueAsString(LaborEnterpriseFeedStep.class, LaborConstants.BenefitCalculation.LABOR_BENEFIT_CALCULATION_OFFSET_IND);
    
    if(offsetParmValue.equalsIgnoreCase("n")) {
        for(Iterator<Column> it = columns.iterator(); it.hasNext(); ) {
            Column column = (Column)it.next();
            if(column.getPropertyName().equalsIgnoreCase(LaborConstants.BenefitCalculation.ACCOUNT_CODE_OFFSET_PROPERTY_NAME) || column.getPropertyName().equalsIgnoreCase(LaborConstants.BenefitCalculation.OBJECT_CODE_OFFSET_PROPERTY_NAME)) {
                it.remove();
            }
        }
    }
    
    return columns;
}
 
开发者ID:kuali,项目名称:kfs,代码行数:21,代码来源:BenefitsCalculationLookupableHelperServiceImpl.java


示例4: performLookup

import org.kuali.rice.kns.web.ui.Column; //导入依赖的package包/类
/**
 * Using default results, add columnAnchor link for reference financial document number to open document
 *
 * @param lookupForm
 * @param kualiLookupable
 * @param resultTable
 * @param bounded
 * @return
 *
 * KRAD Conversion: Lookupable performing customization of columns of the display list.
 */
@Override
public Collection performLookup(LookupForm lookupForm, Collection resultTable, boolean bounded) {
    Collection displayList = super.performLookup(lookupForm, resultTable, bounded);
    for (ResultRow row : (Collection<ResultRow>)resultTable) {
        for (Column col : row.getColumns()) {
            if (StringUtils.equals("referenceFinancialDocumentNumber", col.getPropertyName()) && StringUtils.isNotBlank(col.getPropertyValue())) {
                String propertyURL = SpringContext.getBean(ConfigurationService.class).getPropertyValueAsString(KFSConstants.WORKFLOW_URL_KEY) + "/DocHandler.do?docId=" + col.getPropertyValue() + "&command=displayDocSearchView";
                AnchorHtmlData htmlData = new AnchorHtmlData(propertyURL, "", col.getPropertyValue());
                htmlData.setTitle(col.getPropertyValue());
                col.setColumnAnchor(htmlData);
            }
        }
    }
    return displayList;
}
 
开发者ID:kuali,项目名称:kfs,代码行数:27,代码来源:ElectronicPaymentClaimLookupableHelperServiceImpl.java


示例5: getColumns

import org.kuali.rice.kns.web.ui.Column; //导入依赖的package包/类
/**
 * @see org.kuali.rice.kns.lookup.AbstractLookupableHelperServiceImpl#getColumns()
 */
@Override
public List<Column> getColumns() {
    List<Column> columns =  super.getColumns();

    if (!getAccountsReceivableModuleBillingService().isContractsGrantsBillingEnhancementActive()) {
        for(Iterator<Column> it = columns.iterator(); it.hasNext(); ) {
            Column column = it.next();
            if (getFieldsToIgnore().contains(column.getPropertyName())) {
                it.remove();
            }
        }
    }

    return columns;
}
 
开发者ID:kuali,项目名称:kfs,代码行数:19,代码来源:AwardLookupableHelperServiceImpl.java


示例6: constructColumnsFromAttributeFields

import org.kuali.rice.kns.web.ui.Column; //导入依赖的package包/类
public static List<Column> constructColumnsFromAttributeFields(List<RemotableAttributeField> attributeFields) {
    List<Column> attributeColumns = new ArrayList<Column>();
    if (attributeFields != null) {
        for (RemotableAttributeField attributeField : attributeFields) {
                attributeColumns.add(constructColumnFromAttributeField(attributeField));
        }
    }
    return attributeColumns;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:10,代码来源:FieldUtils.java


示例7: getColumns

import org.kuali.rice.kns.web.ui.Column; //导入依赖的package包/类
@Override
public List<Column> getColumns() {
	List<Column> columns =  super.getColumns();
       for (Row row : attrRows) {
           for (Field field : row.getFields()) {
               Column newColumn = new Column();
               newColumn.setColumnTitle(field.getFieldLabel());
               newColumn.setMaxLength(getColumnMaxLength(field.getPropertyName()));
               newColumn.setPropertyName(field.getPropertyName());
               newColumn.setFormatter(field.getFormatter());
               columns.add(newColumn);
           }
       }
       return columns;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:16,代码来源:GroupLookupableHelperServiceImpl.java


示例8: refresh

import org.kuali.rice.kns.web.ui.Column; //导入依赖的package包/类
/**
 *
 * @see org.kuali.rice.kns.maintenance.KualiMaintainableImpl#refresh(java.lang.String, java.util.Map, org.kuali.rice.kns.document.MaintenanceDocument)
 */
@SuppressWarnings("unchecked")
@Override
public void refresh(String refreshCaller, Map fieldValues, MaintenanceDocument document) {
    super.refresh(refreshCaller, fieldValues, document);
    final String lookupBusinessObjectClassName = (String)fieldValues.get(OLEConstants.LOOKUP_RESULTS_BO_CLASS_NAME);
    if (!StringUtils.isBlank(lookupBusinessObjectClassName)) {
        if (lookupBusinessObjectClassName.equals(OrganizationReversion.class.getName())) {
            final String lookupResultsSequenceNumber = (String)fieldValues.get(OLEConstants.LOOKUP_RESULTS_SEQUENCE_NUMBER);
            if (!StringUtils.isBlank(lookupResultsSequenceNumber)) {
                final LookupResultsService lookupResultsService = SpringContext.getBean(LookupResultsService.class);
                try {
                    final List<ResultRow> resultRows = lookupResultsService.retrieveResultsTable(lookupResultsSequenceNumber, GlobalVariables.getUserSession().getPrincipalId());
                    if (!resultRows.isEmpty()) {
                        final ResultRow topRow = resultRows.get(0);
                        for (Column column : topRow.getColumns()) {
                            if (column.getPropertyName().equals(OLEPropertyConstants.UNIVERSITY_FISCAL_YEAR)) {
                                final String universityFiscalYearAsString = column.getPropertyValue();
                                final Integer universityFiscalYear = Integer.parseInt(universityFiscalYearAsString);

                                final OrganizationReversionGlobal orgRevGlobal = ((OrganizationReversionGlobal)document.getNewMaintainableObject().getBusinessObject());
                                orgRevGlobal.setUniversityFiscalYear(universityFiscalYear);
                            }
                        }
                    }
                }
                catch (Exception ex) {
                    throw new RuntimeException("Could not retrieve lookup results to populate fiscal year", ex);
                }


            }
        }
    }

}
 
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:40,代码来源:OrganizationReversionGlobalMaintainableImpl.java


示例9: startRow

import org.kuali.rice.kns.web.ui.Column; //导入依赖的package包/类
/**
 * Generates the first row of the table, which acts as the headers for the data.
 * 
 * @return the String to display as the first row in the table
 * @see org.displaytag.decorator.TableDecorator#startRow()
 *
 * KRAD Conversion: Inquirable customizes the first row with columns.
 * No use of data dictionary here.
 */
@Override
public String startRow() {
    // TableTagParameters.
    PageContext pageContext = getPageContext();
    MediaTypeEnum mediaType = (MediaTypeEnum) pageContext.getAttribute("mediaType");
    ResultRow row = (ResultRow) getCurrentRowObject();

    if (MediaTypeEnum.HTML.equals(mediaType)) { // Display the nested table.

        StringBuffer rowBuffer = new StringBuffer("<tr>");
        rowBuffer.append("<tr>");

        List columns = row.getColumns();
        int columnCount = 0;
        numOfNonMonthField = columns.size() - numOfMonthField;
        for (Iterator i = columns.iterator(); i.hasNext() && columnCount++ < numOfNonMonthField;) {
            Column column = (Column) i.next();

            if (rowCounter > 0) {
                rowBuffer.append("<th>");
                rowBuffer.append(column.getColumnTitle());
                rowBuffer.append("</th>");
            }
        }
        rowBuffer.append("</tr>");
        return rowBuffer.toString();
    }
    return super.startRow();
}
 
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:39,代码来源:BalanceInquiryTableDecorator.java


示例10: sort

import org.kuali.rice.kns.web.ui.Column; //导入依赖的package包/类
/**
 * @see org.kuali.rice.kns.web.struts.action.KualiTableAction#sort(org.apache.struts.action.ActionMapping,
 *      org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
 *
 * KRAD Conversion: Uses the metadata of different columns created and selects the
 * column name and column comparator and uses these properties to srt the list.
 * There is no use of data dictionary.
 */
@Override
public ActionForward sort(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
    CorrectionForm correctionForm = (CorrectionForm) form;
    int maxRowsPerPage = CorrectionDocumentUtils.getRecordsPerPage();

    KualiTableRenderFormMetadata originEntrySearchResultTableMetadata = correctionForm.getOriginEntrySearchResultTableMetadata();

    List<Column> columns = SpringContext.getBean(CorrectionDocumentService.class).getTableRenderColumnMetadata(correctionForm.getDocument().getDocumentNumber());

    String propertyToSortName = columns.get(originEntrySearchResultTableMetadata.getColumnToSortIndex()).getPropertyName();
    Comparator valueComparator = columns.get(originEntrySearchResultTableMetadata.getColumnToSortIndex()).getValueComparator();

    boolean sortDescending = false;
    if (originEntrySearchResultTableMetadata.getPreviouslySortedColumnIndex() == originEntrySearchResultTableMetadata.getColumnToSortIndex()) {
        // clicked sort on the same column that was previously sorted, so we will reverse the sort order
        sortDescending = !originEntrySearchResultTableMetadata.isSortDescending();
        originEntrySearchResultTableMetadata.setSortDescending(sortDescending);
    }

    originEntrySearchResultTableMetadata.setSortDescending(sortDescending);
    // sort the list now so that it will be rendered correctly
    sortList(correctionForm.getDisplayEntries(), propertyToSortName, valueComparator, sortDescending);

    // sorting, so go back to the first page
    originEntrySearchResultTableMetadata.jumpToFirstPage(correctionForm.getDisplayEntries().size(), maxRowsPerPage);

    return mapping.findForward(OLEConstants.MAPPING_BASIC);
}
 
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:37,代码来源:CorrectionAction.java


示例11: applyPagingAndSortingFromPreviousPageView

import org.kuali.rice.kns.web.ui.Column; //导入依赖的package包/类
/**
 * KRAD Conversion: Uses the metadata of different columns created and selects the
 * column name and column comparator and uses these properties to srt the list.
 * There is no use of data dictionary.
 */
protected void applyPagingAndSortingFromPreviousPageView(CorrectionForm correctionForm) {
    KualiTableRenderFormMetadata originEntrySearchResultTableMetadata = correctionForm.getOriginEntrySearchResultTableMetadata();
    if (originEntrySearchResultTableMetadata.getPreviouslySortedColumnIndex() != -1) {

        List<Column> columns = SpringContext.getBean(CorrectionDocumentService.class).getTableRenderColumnMetadata(correctionForm.getDocument().getDocumentNumber());

        String propertyToSortName = columns.get(originEntrySearchResultTableMetadata.getPreviouslySortedColumnIndex()).getPropertyName();
        Comparator valueComparator = columns.get(originEntrySearchResultTableMetadata.getPreviouslySortedColumnIndex()).getValueComparator();
        sortList(correctionForm.getDisplayEntries(), propertyToSortName, valueComparator, originEntrySearchResultTableMetadata.isSortDescending());
    }

    int maxRowsPerPage = CorrectionDocumentUtils.getRecordsPerPage();
    originEntrySearchResultTableMetadata.jumpToPage(originEntrySearchResultTableMetadata.getViewedPageNumber(), correctionForm.getDisplayEntries().size(), maxRowsPerPage);
}
 
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:20,代码来源:CorrectionAction.java


示例12: getSelectedProposalNumbersFromLookupResultsSequenceNumber

import org.kuali.rice.kns.web.ui.Column; //导入依赖的package包/类
/**
 * Get the selected proposal numbers to be used as keys to retrieve the awards by retrieving the selected object ids
 * and then matching them against the results from the lookup.
 *
 * @param lookupResultsSequenceNumber sequence number used to retrieve the lookup results and selected object ids
 * @param personId person who performed the lookup
 * @return List of proposalNumber Strings that the user selected
 * @throws Exception if there was a problem getting the selected object ids or the lookup results
 */
protected List getSelectedProposalNumbersFromLookupResultsSequenceNumber(String lookupResultsSequenceNumber, String personId) throws Exception {
    List<String> selectedProposalNumbers = new ArrayList<String>();
    Set<String> selectedIds = getSegmentedLookupResultsService().retrieveSetOfSelectedObjectIds(lookupResultsSequenceNumber, GlobalVariables.getUserSession().getPerson().getPrincipalId());
    if (CollectionUtils.isNotEmpty(selectedIds)) {
        List<ResultRow> results = getLookupResultsService().retrieveResultsTable(lookupResultsSequenceNumber, personId);
        for (ResultRow result:results) {
            List<Column> columns = result.getColumns();
            if (result instanceof ContractsGrantsLookupResultRow) {
                for (ResultRow subResultRow : ((ContractsGrantsLookupResultRow) result).getSubResultRows()) {
                    String objId = subResultRow.getObjectId();
                    if (selectedIds.contains(objId)) {
                        // This is somewhat brittle - it depends on the fact that the Proposal Number is one of
                        // the columns in the sub result rows. If that changes, this will no longer work and will
                        // need to be changed.
                        for (Column column: subResultRow.getColumns()) {
                            if (StringUtils.equals(column.getPropertyName(), KFSPropertyConstants.PROPOSAL_NUMBER)) {
                                selectedProposalNumbers.add(subResultRow.getColumns().get(0).getPropertyValue());
                                break;
                            }
                        }

                    }
                }
            }
        }
    }

    return selectedProposalNumbers;
}
 
开发者ID:kuali,项目名称:kfs,代码行数:39,代码来源:ContractsGrantsInvoiceSummaryAction.java


示例13: buildResultTable

import org.kuali.rice.kns.web.ui.Column; //导入依赖的package包/类
@Override
protected void buildResultTable(LookupForm lookupForm, Collection displayList, Collection resultTable) {
    Person user = GlobalVariables.getUserSession().getPerson();
    boolean hasReturnableRow = false;
    // iterate through result list and wrap rows with return url and action url
    for (Iterator iter = displayList.iterator(); iter.hasNext();) {
        BusinessObject element = (BusinessObject) iter.next();

        BusinessObjectRestrictions businessObjectRestrictions = getBusinessObjectAuthorizationService().getLookupResultRestrictions(element, user);

        List<Column> columns = getColumns();
        for (Iterator iterator = columns.iterator(); iterator.hasNext();) {
            Column col = (Column) iterator.next();

            String propValue = ObjectUtils.getFormattedPropertyValue(element, col.getPropertyName(), col.getFormatter());
            Class propClass = getPropertyClass(element, col.getPropertyName());

            col.setComparator(CellComparatorHelper.getAppropriateComparatorForPropertyClass(propClass));
            col.setValueComparator(CellComparatorHelper.getAppropriateValueComparatorForPropertyClass(propClass));

            String propValueBeforePotientalMasking = propValue;
            propValue = maskValueIfNecessary(element.getClass(), col.getPropertyName(), propValue, businessObjectRestrictions);
            col.setPropertyValue(propValue);
        }

        ResultRow row = new ResultRow(columns, "", ACTION_URLS_EMPTY);

        if (getBusinessObjectDictionaryService().isExportable(getBusinessObjectClass())) {
            row.setBusinessObject(element);
        }
        boolean isRowReturnable = isResultReturnable(element);
        row.setRowReturnable(isRowReturnable);
        if (isRowReturnable) {
            hasReturnableRow = true;
        }
        resultTable.add(row);
    }
    lookupForm.setHasReturnableRow(hasReturnableRow);
}
 
开发者ID:kuali,项目名称:kfs,代码行数:40,代码来源:ContractsGrantsMilestoneReportLookupableHelperServiceImpl.java


示例14: getColumns

import org.kuali.rice.kns.web.ui.Column; //导入依赖的package包/类
/**
 * Constructs the list of columns for the search results. All properties for the column objects come from the DataDictionary.
 *
 * @param bo
 * @return Collection<Column>
 */
protected Collection<Column> getColumns(BusinessObject bo, BusinessObjectRestrictions businessObjectRestrictions) {
    Collection<Column> columns = new ArrayList<Column>();

    for (String attributeName : getBusinessObjectDictionaryService().getLookupResultFieldNames(bo.getClass())) {
        columns.add(setupResultsColumn(bo, attributeName, businessObjectRestrictions));
    }
    return columns;
}
 
开发者ID:kuali,项目名称:kfs,代码行数:15,代码来源:GenerateDunningLettersLookupableHelperServiceImpl.java


示例15: sort

import org.kuali.rice.kns.web.ui.Column; //导入依赖的package包/类
@Override
public ActionForward sort(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
    TemCorrectionForm correctionForm = (TemCorrectionForm) form;
    int maxRowsPerPage = MAX_ROWS;

    KualiTableRenderFormMetadata agencyEntrySearchResultTableMetadata = correctionForm.getAgencyEntrySearchResultTableMetadata();

    List<Column> columns = SpringContext.getBean(TemCorrectionDocumentService.class).getTableRenderColumnMetadata(correctionForm.getDocument().getDocumentNumber());

    String propertyToSortName = columns.get(agencyEntrySearchResultTableMetadata.getColumnToSortIndex()).getPropertyName();
    Comparator valueComparator = columns.get(agencyEntrySearchResultTableMetadata.getColumnToSortIndex()).getValueComparator();

    boolean sortDescending = false;
    if (agencyEntrySearchResultTableMetadata.getPreviouslySortedColumnIndex() == agencyEntrySearchResultTableMetadata.getColumnToSortIndex()) {
        // clicked sort on the same column that was previously sorted, so we will reverse the sort order
        sortDescending = !agencyEntrySearchResultTableMetadata.isSortDescending();
        agencyEntrySearchResultTableMetadata.setSortDescending(sortDescending);
    }

    agencyEntrySearchResultTableMetadata.setSortDescending(sortDescending);
    // sort the list now so that it will be rendered correctly
    sortList(correctionForm.getDisplayEntries(), propertyToSortName, valueComparator, sortDescending);

    // sorting, so go back to the first page
    agencyEntrySearchResultTableMetadata.jumpToFirstPage(correctionForm.getDisplayEntries().size(), maxRowsPerPage);

    return mapping.findForward(KFSConstants.MAPPING_BASIC);
}
 
开发者ID:kuali,项目名称:kfs,代码行数:29,代码来源:TemCorrectionAction.java


示例16: applyPagingAndSortingFromPreviousPageView

import org.kuali.rice.kns.web.ui.Column; //导入依赖的package包/类
protected void applyPagingAndSortingFromPreviousPageView(TemCorrectionForm correctionForm) {
    KualiTableRenderFormMetadata agencyEntrySearchResultTableMetadata = correctionForm.getAgencyEntrySearchResultTableMetadata();
    if (agencyEntrySearchResultTableMetadata.getPreviouslySortedColumnIndex() != -1) {

        List<Column> columns = SpringContext.getBean(TemCorrectionDocumentService.class).getTableRenderColumnMetadata(correctionForm.getDocument().getDocumentNumber());

        String propertyToSortName = columns.get(agencyEntrySearchResultTableMetadata.getPreviouslySortedColumnIndex()).getPropertyName();
        Comparator valueComparator = columns.get(agencyEntrySearchResultTableMetadata.getPreviouslySortedColumnIndex()).getValueComparator();
        sortList(correctionForm.getDisplayEntries(), propertyToSortName, valueComparator, agencyEntrySearchResultTableMetadata.isSortDescending());
    }

    int maxRowsPerPage = 25;
    agencyEntrySearchResultTableMetadata.jumpToPage(agencyEntrySearchResultTableMetadata.getViewedPageNumber(), correctionForm.getDisplayEntries().size(), maxRowsPerPage);
}
 
开发者ID:kuali,项目名称:kfs,代码行数:15,代码来源:TemCorrectionAction.java


示例17: sort

import org.kuali.rice.kns.web.ui.Column; //导入依赖的package包/类
/**
 * Sort labor correction document by selected column
 * 
 * @see org.kuali.rice.kns.web.struts.action.KualiTableRenderAction#sort(org.apache.struts.action.ActionMapping,
 *      org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
 *      
 * KRAD Conversion: Performs sorting of the results based on column to sort.
 * 
 * Uses data dictionary for originEntrySearchResultTableMetadata
 */
public ActionForward sort(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
    LaborCorrectionForm correctionForm = (LaborCorrectionForm) form;
    
    // when we return from the lookup, our next request's method to call is going to be refresh
    correctionForm.registerEditableProperty(KRADConstants.DISPATCH_REQUEST_PARAMETER);
    
    int maxRowsPerPage = CorrectionDocumentUtils.getRecordsPerPage();

    KualiTableRenderFormMetadata originEntrySearchResultTableMetadata = correctionForm.getOriginEntrySearchResultTableMetadata();

    List<Column> columns = SpringContext.getBean(LaborCorrectionDocumentService.class).getTableRenderColumnMetadata(correctionForm.getDocument().getDocumentNumber());

    String propertyToSortName = columns.get(originEntrySearchResultTableMetadata.getColumnToSortIndex()).getPropertyName();
    Comparator valueComparator = columns.get(originEntrySearchResultTableMetadata.getColumnToSortIndex()).getValueComparator();

    boolean sortDescending = false;
    if (originEntrySearchResultTableMetadata.getPreviouslySortedColumnIndex() == originEntrySearchResultTableMetadata.getColumnToSortIndex()) {
        // clicked sort on the same column that was previously sorted, so we will reverse the sort order
        sortDescending = !originEntrySearchResultTableMetadata.isSortDescending();
        originEntrySearchResultTableMetadata.setSortDescending(sortDescending);
    }

    originEntrySearchResultTableMetadata.setSortDescending(sortDescending);
    // sort the list now so that it will be rendered correctly
    sortList(correctionForm.getDisplayEntries(), propertyToSortName, valueComparator, sortDescending);

    // sorting, so go back to the first page
    originEntrySearchResultTableMetadata.jumpToFirstPage(correctionForm.getDisplayEntries().size(), maxRowsPerPage);

    return mapping.findForward(KFSConstants.MAPPING_BASIC);
}
 
开发者ID:kuali,项目名称:kfs,代码行数:42,代码来源:LaborCorrectionAction.java


示例18: applyPagingAndSortingFromPreviousPageView

import org.kuali.rice.kns.web.ui.Column; //导入依赖的package包/类
/**
 * Apply paging and sorting from previous page view
 * 
 * @see org.kuali.kfs.gl.document.web.struts.CorrectionAction#applyPagingAndSortingFromPreviousPageView(org.kuali.kfs.gl.document.web.struts.CorrectionForm)
 *      
 * KRAD Conversion: Performs sorting of the results based on column to sort.
 * 
 * Uses data dictionary for originEntrySearchResultTableMetadata
 */
protected void applyPagingAndSortingFromPreviousPageView(LaborCorrectionForm laborCorrectionForm) {
    KualiTableRenderFormMetadata originEntrySearchResultTableMetadata = laborCorrectionForm.getOriginEntrySearchResultTableMetadata();
    if (originEntrySearchResultTableMetadata.getPreviouslySortedColumnIndex() != -1) {

        List<Column> columns = SpringContext.getBean(LaborCorrectionDocumentService.class).getTableRenderColumnMetadata(laborCorrectionForm.getDocument().getDocumentNumber());

        String propertyToSortName = columns.get(originEntrySearchResultTableMetadata.getPreviouslySortedColumnIndex()).getPropertyName();
        Comparator valueComparator = columns.get(originEntrySearchResultTableMetadata.getPreviouslySortedColumnIndex()).getValueComparator();
        sortList(laborCorrectionForm.getDisplayEntries(), propertyToSortName, valueComparator, originEntrySearchResultTableMetadata.isSortDescending());
    }

    int maxRowsPerPage = CorrectionDocumentUtils.getRecordsPerPage();
    originEntrySearchResultTableMetadata.jumpToPage(originEntrySearchResultTableMetadata.getViewedPageNumber(), laborCorrectionForm.getDisplayEntries().size(), maxRowsPerPage);
}
 
开发者ID:kuali,项目名称:kfs,代码行数:24,代码来源:LaborCorrectionAction.java


示例19: refresh

import org.kuali.rice.kns.web.ui.Column; //导入依赖的package包/类
/**
 *
 * @see org.kuali.rice.kns.maintenance.KualiMaintainableImpl#refresh(java.lang.String, java.util.Map, org.kuali.rice.kns.document.MaintenanceDocument)
 */
@SuppressWarnings("unchecked")
@Override
public void refresh(String refreshCaller, Map fieldValues, MaintenanceDocument document) {
    super.refresh(refreshCaller, fieldValues, document);
    final String lookupBusinessObjectClassName = (String)fieldValues.get(KFSConstants.LOOKUP_RESULTS_BO_CLASS_NAME);
    if (!StringUtils.isBlank(lookupBusinessObjectClassName)) {
        if (lookupBusinessObjectClassName.equals(OrganizationReversion.class.getName())) {
            final String lookupResultsSequenceNumber = (String)fieldValues.get(KFSConstants.LOOKUP_RESULTS_SEQUENCE_NUMBER);
            if (!StringUtils.isBlank(lookupResultsSequenceNumber)) {
                final LookupResultsService lookupResultsService = SpringContext.getBean(LookupResultsService.class);
                try {
                    final List<ResultRow> resultRows = lookupResultsService.retrieveResultsTable(lookupResultsSequenceNumber, GlobalVariables.getUserSession().getPrincipalId());
                    if (!resultRows.isEmpty()) {
                        final ResultRow topRow = resultRows.get(0);
                        for (Column column : topRow.getColumns()) {
                            if (column.getPropertyName().equals(KFSPropertyConstants.UNIVERSITY_FISCAL_YEAR)) {
                                final String universityFiscalYearAsString = column.getPropertyValue();
                                final Integer universityFiscalYear = Integer.parseInt(universityFiscalYearAsString);

                                final OrganizationReversionGlobal orgRevGlobal = ((OrganizationReversionGlobal)document.getNewMaintainableObject().getBusinessObject());
                                orgRevGlobal.setUniversityFiscalYear(universityFiscalYear);
                            }
                        }
                    }
                }
                catch (Exception ex) {
                    throw new RuntimeException("Could not retrieve lookup results to populate fiscal year", ex);
                }


            }
        }
    }

}
 
开发者ID:kuali,项目名称:kfs,代码行数:40,代码来源:OrganizationReversionGlobalMaintainableImpl.java


示例20: getSelectedObjectIds

import org.kuali.rice.kns.web.ui.Column; //导入依赖的package包/类
/**
 * put all enties into select object map. This implmentation only deals with the money amount objects.
 * 
 * @param multipleValueLookupForm the given struts form
 * @param resultTable the given result table that holds all data being presented
 * @return the map containing all entries available for selection
 * 
 * KRAD Conversion: Performs customization of the results. Prepares
 * 
 * There is no use of data dictionary for fields.
 */
private Map<String, String> getSelectedObjectIds(MultipleValueLookupForm multipleValueLookupForm, List<ResultRow> resultTable) {
    String businessObjectClassName = multipleValueLookupForm.getBusinessObjectClassName();
    SegmentedBusinessObject segmentedBusinessObject;
    try {
        segmentedBusinessObject = (SegmentedBusinessObject) Class.forName(multipleValueLookupForm.getBusinessObjectClassName()).newInstance();
    }
    catch (Exception e) {
        throw new RuntimeException("Fail to create an object of " + businessObjectClassName + e);
    }

    Map<String, String> selectedObjectIds = new HashMap<String, String>();
    Collection<String> segmentedPropertyNames = segmentedBusinessObject.getSegmentedPropertyNames();
    for (ResultRow row : resultTable) {
        for (Column column : row.getColumns()) {
            String propertyName = column.getPropertyName();
            if (segmentedPropertyNames.contains(propertyName)) {
                String propertyValue = StringUtils.replace(column.getPropertyValue(), ",", "");
                KualiDecimal amount = new KualiDecimal(propertyValue);

                if (amount.isNonZero()) {
                    String objectId = row.getObjectId() + "." + propertyName + "." + KRADUtils.convertDecimalIntoInteger(amount);
                    selectedObjectIds.put(objectId, objectId);
                }
            }
        }
    }

    return selectedObjectIds;
}
 
开发者ID:kuali,项目名称:kfs,代码行数:41,代码来源:BalanceInquiryLookupAction.java



注:本文中的org.kuali.rice.kns.web.ui.Column类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java JetTemplate类代码示例发布时间:2022-05-22
下一篇:
Java Workspace类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap