• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java KualiTableRenderFormMetadata类的典型用法和代码示例

java 2次浏览

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

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

示例1: loadDocument

点赞 3

import org.kuali.rice.kns.web.struts.form.KualiTableRenderFormMetadata; //导入依赖的package包/类
/**
 * This overridden method ...
 *
 * @see org.kuali.rice.krad.web.struts.action.KualiDocumentActionBase#loadDocument(org.kuali.rice.krad.web.struts.form.KualiDocumentFormBase)
 */
@Override
protected void loadDocument(KualiDocumentFormBase form)
        throws WorkflowException {
    super.loadDocument(form);

    IdentityManagementRoleDocumentForm roleDocumentForm = (IdentityManagementRoleDocumentForm) form;
    setKimType(roleDocumentForm.getRoleDocument().getRoleTypeId(), roleDocumentForm);

    getUiDocumentService().setDelegationMembersInDocument(roleDocumentForm.getRoleDocument());
    getUiDocumentService().setMembersInDocument(roleDocumentForm.getRoleDocument());

    roleDocumentForm.setMember(roleDocumentForm.getRoleDocument().getBlankMember());
    roleDocumentForm.setDelegationMember(roleDocumentForm.getRoleDocument().getBlankDelegationMember());

    KualiTableRenderFormMetadata memberTableMetadata = roleDocumentForm.getMemberTableMetadata();
    if (roleDocumentForm.getMemberRows() != null) {
        memberTableMetadata.jumpToFirstPage(roleDocumentForm.getMemberRows().size(), roleDocumentForm.getRecordsPerPage());
    }
}
 

开发者ID:kuali,
项目名称:kc-rice,
代码行数:25,
代码来源:IdentityManagementRoleDocumentAction.java

示例2: createDocument

点赞 3

import org.kuali.rice.kns.web.struts.form.KualiTableRenderFormMetadata; //导入依赖的package包/类
/**
 * This overridden method ...
 *
 * @see org.kuali.rice.krad.web.struts.action.KualiDocumentActionBase#createDocument(org.kuali.rice.krad.web.struts.form.KualiDocumentFormBase)
 */
@Override
protected void createDocument(KualiDocumentFormBase form)
        throws WorkflowException {
    super.createDocument(form);
    IdentityManagementRoleDocumentForm roleDocumentForm = (IdentityManagementRoleDocumentForm) form;

    if (roleDocumentForm.getRoleId() == null) {
        roleDocumentForm.getRoleDocument().setKimType(roleDocumentForm.getKimType());
        roleDocumentForm.getRoleDocument().initializeDocumentForNewRole();
        roleDocumentForm.setRoleId(roleDocumentForm.getRoleDocument().getRoleId());
        //roleDocumentForm.setKimType(KimApiServiceLocator.getKimTypeInfoService().getKimType(roleDocumentForm.getRoleDocument().getRoleTypeId()));
    } else {
        loadRoleIntoDocument(roleDocumentForm.getRoleId(), roleDocumentForm);
    }

    roleDocumentForm.setMember(roleDocumentForm.getRoleDocument().getBlankMember());
    roleDocumentForm.setDelegationMember(roleDocumentForm.getRoleDocument().getBlankDelegationMember());

    KualiTableRenderFormMetadata memberTableMetadata = roleDocumentForm.getMemberTableMetadata();
    if (roleDocumentForm.getMemberRows() != null) {
        memberTableMetadata.jumpToFirstPage(roleDocumentForm.getMemberRows().size(), roleDocumentForm.getRecordsPerPage());
    }
}
 

开发者ID:kuali,
项目名称:kc-rice,
代码行数:29,
代码来源:IdentityManagementRoleDocumentAction.java

示例3: execute

点赞 3

import org.kuali.rice.kns.web.struts.form.KualiTableRenderFormMetadata; //导入依赖的package包/类
@Override
public ActionForward execute(ActionMapping mapping, ActionForm form,
        HttpServletRequest request, HttpServletResponse response) throws Exception {

    IdentityManagementGroupDocumentForm groupDocumentForm = (IdentityManagementGroupDocumentForm) form;

    ActionForward forward = super.execute(mapping, form, request, response);

    String previouslySortedColumnName = (String)GlobalVariables.getUserSession().retrieveObject(KimConstants.KimUIConstants.KIM_GROUP_INQUIRY_SORT_PREV_COL_NM);
    Boolean sortDescending = ((Boolean)GlobalVariables.getUserSession().retrieveObject(KimConstants.KimUIConstants.KIM_GROUP_INQUIRY_SORT_DESC_VALUE));

    KualiTableRenderFormMetadata memberTableMetadata =  groupDocumentForm.getMemberTableMetadata();
    memberTableMetadata.setPreviouslySortedColumnName(previouslySortedColumnName);
    if (sortDescending != null) {
        memberTableMetadata.setSortDescending(sortDescending.booleanValue());
    }
    if (groupDocumentForm.getMemberRows() != null) {
        memberTableMetadata.sort(groupDocumentForm.getMemberRows(), groupDocumentForm.getRecordsPerPage());
        memberTableMetadata.jumpToPage(memberTableMetadata.getSwitchToPageNumber(), groupDocumentForm.getMemberRows().size(), groupDocumentForm.getRecordsPerPage());
    }

    GlobalVariables.getUserSession().addObject(KimConstants.KimUIConstants.KIM_GROUP_INQUIRY_SORT_PREV_COL_NM, memberTableMetadata.getPreviouslySortedColumnName());
    GlobalVariables.getUserSession().addObject(KimConstants.KimUIConstants.KIM_GROUP_INQUIRY_SORT_DESC_VALUE, memberTableMetadata.isSortDescending());

    return forward;
}
 

开发者ID:kuali,
项目名称:kc-rice,
代码行数:27,
代码来源:IdentityManagementGroupInquiry.java

示例4: execute

点赞 3

import org.kuali.rice.kns.web.struts.form.KualiTableRenderFormMetadata; //导入依赖的package包/类
@Override
public ActionForward execute(ActionMapping mapping, ActionForm form,
		HttpServletRequest request, HttpServletResponse response) throws Exception {
       IdentityManagementGroupDocumentForm groupDocumentForm = (IdentityManagementGroupDocumentForm) form;
       if ( StringUtils.isBlank( groupDocumentForm.getGroupId() ) ) {
           String groupId = request.getParameter(KimConstants.PrimaryKeyConstants.GROUP_ID);
       	groupDocumentForm.setGroupId(groupId);
       }
	String kimTypeId = request.getParameter(KimConstants.PrimaryKeyConstants.KIM_TYPE_ID);
       setKimType(kimTypeId, groupDocumentForm);

       
	KualiTableRenderFormMetadata memberTableMetadata = groupDocumentForm.getMemberTableMetadata();
	if (groupDocumentForm.getMemberRows() != null) {
		memberTableMetadata.jumpToPage(memberTableMetadata.getViewedPageNumber(), groupDocumentForm.getMemberRows().size(), groupDocumentForm.getRecordsPerPage());
		// KULRICE-3972: need to be able to sort by column header like on lookups when editing large roles and groups
		memberTableMetadata.sort(groupDocumentForm.getMemberRows(), groupDocumentForm.getRecordsPerPage());
	}
	
	ActionForward forward = super.execute(mapping, groupDocumentForm, request, response);
	
	groupDocumentForm.setCanAssignGroup(validAssignGroup(groupDocumentForm.getGroupDocument()));
	return forward;
   }
 

开发者ID:kuali,
项目名称:kc-rice,
代码行数:25,
代码来源:IdentityManagementGroupDocumentAction.java

示例5: createDocument

点赞 3

import org.kuali.rice.kns.web.struts.form.KualiTableRenderFormMetadata; //导入依赖的package包/类
/**
   * This overridden method ...
   * 
   * @see org.kuali.rice.krad.web.struts.action.KualiDocumentActionBase#createDocument(org.kuali.rice.krad.web.struts.form.KualiDocumentFormBase)
   */
  @Override
  protected void createDocument(KualiDocumentFormBase form)
  		throws WorkflowException {
  	super.createDocument(form);
  	IdentityManagementGroupDocumentForm groupDocumentForm = (IdentityManagementGroupDocumentForm) form;
  	if ( groupDocumentForm.getGroupId() == null ) {
  		groupDocumentForm.getGroupDocument().setKimType(groupDocumentForm.getKimType());
  		groupDocumentForm.getGroupDocument().initializeDocumentForNewGroup();
  		groupDocumentForm.setGroupId( groupDocumentForm.getGroupDocument().getGroupId() );
  		setKimType(groupDocumentForm.getGroupDocument().getGroupTypeId(), groupDocumentForm);
  	} else {
  		loadGroupIntoDocument( groupDocumentForm.getGroupId(), groupDocumentForm );
  	}
KualiTableRenderFormMetadata memberTableMetadata = groupDocumentForm.getMemberTableMetadata();
if (groupDocumentForm.getMemberRows() != null) {
    memberTableMetadata.jumpToFirstPage(groupDocumentForm.getMemberRows().size(), groupDocumentForm.getRecordsPerPage());
}
  }
 

开发者ID:kuali,
项目名称:kc-rice,
代码行数:24,
代码来源:IdentityManagementGroupDocumentAction.java

示例6: loadAllEntries

点赞 3

import org.kuali.rice.kns.web.struts.form.KualiTableRenderFormMetadata; //导入依赖的package包/类
protected void loadAllEntries(List<OriginEntryFull> searchResults, CorrectionForm correctionForm) throws Exception {

        GeneralLedgerCorrectionProcessDocument document = correctionForm.getCorrectionDocument();
        correctionForm.setAllEntries(searchResults);
        correctionForm.setDisplayEntries(new ArrayList<OriginEntryFull>(searchResults));

        updateDocumentSummary(document, correctionForm.getAllEntries(), correctionForm.isRestrictedFunctionalityMode());

        // if not in restricted functionality mode, then we can store these results temporarily in the GLCP origin entry service
        SequenceAccessorService sequenceAccessorService = SpringContext.getBean(SequenceAccessorService.class);
        String glcpSearchResultsSequenceNumber = String.valueOf(sequenceAccessorService.getNextAvailableSequenceNumber(KRADConstants.LOOKUP_RESULTS_SEQUENCE));

        SpringContext.getBean(GlCorrectionProcessOriginEntryService.class).persistAllEntries(glcpSearchResultsSequenceNumber, searchResults);
        correctionForm.setGlcpSearchResultsSequenceNumber(glcpSearchResultsSequenceNumber);

        int maxRowsPerPage = CorrectionDocumentUtils.getRecordsPerPage();
        KualiTableRenderFormMetadata originEntrySearchResultTableMetadata = correctionForm.getOriginEntrySearchResultTableMetadata();
        originEntrySearchResultTableMetadata.jumpToFirstPage(correctionForm.getDisplayEntries().size(), maxRowsPerPage);
        originEntrySearchResultTableMetadata.setColumnToSortIndex(-1);
    }
 

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

示例7: updateEntriesFromCriteria

点赞 3

import org.kuali.rice.kns.web.struts.form.KualiTableRenderFormMetadata; //导入依赖的package包/类
protected void updateEntriesFromCriteria(CorrectionForm correctionForm, boolean clearOutSummary) {
    LOG.debug("updateEntriesFromCriteria() started");

    GeneralLedgerCorrectionProcessDocument document = correctionForm.getCorrectionDocument();
    List<CorrectionChangeGroup> changeCriteriaGroups = document.getCorrectionChangeGroup();

    if (CorrectionDocumentService.CORRECTION_TYPE_CRITERIA.equals(correctionForm.getEditMethod())) {
        applyCriteriaOnEntries(correctionForm.getDisplayEntries(), correctionForm.getMatchCriteriaOnly(), changeCriteriaGroups);
    }
    else if (CorrectionDocumentService.CORRECTION_TYPE_MANUAL.equals(correctionForm.getEditMethod())) {
        applyCriteriaOnEntries(correctionForm.getDisplayEntries(), correctionForm.getShowOutputFlag(), changeCriteriaGroups);
    }
    else if (CorrectionDocumentService.CORRECTION_TYPE_REMOVE_GROUP_FROM_PROCESSING.equals(correctionForm.getEditMethod())) {
        // do nothing
    }

    // Calculate the debit/credit/row count
    updateDocumentSummary(document, correctionForm.getDisplayEntries(), clearOutSummary);

    // update the table rendering info
    int maxRowsPerPage = CorrectionDocumentUtils.getRecordsPerPage();
    KualiTableRenderFormMetadata originEntrySearchResultTableMetadata = correctionForm.getOriginEntrySearchResultTableMetadata();
    originEntrySearchResultTableMetadata.jumpToFirstPage(correctionForm.getDisplayEntries().size(), maxRowsPerPage);
}
 

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

示例8: manualEdit

点赞 3

import org.kuali.rice.kns.web.struts.form.KualiTableRenderFormMetadata; //导入依赖的package包/类
public ActionForward manualEdit(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) {
    LOG.debug("manualEdit() started");

    TemCorrectionForm correctionForm = (TemCorrectionForm) form;
    TemCorrectionProcessDocument document = correctionForm.getCorrectionDocument();

    correctionForm.clearEntryForManualEdit();
    correctionForm.setEditableFlag(true);
    correctionForm.setManualEditFlag(false);

    int maxRowsPerPage = 25;
    KualiTableRenderFormMetadata agencyEntrySearchResultTableMetadata = correctionForm.getAgencyEntrySearchResultTableMetadata();
    agencyEntrySearchResultTableMetadata.jumpToFirstPage(correctionForm.getAllEntries().size(), maxRowsPerPage);
    agencyEntrySearchResultTableMetadata.setColumnToSortIndex(-1);

    return mapping.findForward(KFSConstants.MAPPING_BASIC);
}
 

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

示例9: loadAllEntries

点赞 3

import org.kuali.rice.kns.web.struts.form.KualiTableRenderFormMetadata; //导入依赖的package包/类
protected void loadAllEntries(List<OriginEntryFull> searchResults, CorrectionForm correctionForm) throws Exception {
    
    GeneralLedgerCorrectionProcessDocument document = correctionForm.getCorrectionDocument();
    correctionForm.setAllEntries(searchResults);
    correctionForm.setDisplayEntries(new ArrayList<OriginEntryFull>(searchResults));

    updateDocumentSummary(document, correctionForm.getAllEntries(), correctionForm.isRestrictedFunctionalityMode());

    // if not in restricted functionality mode, then we can store these results temporarily in the GLCP origin entry service
    SequenceAccessorService sequenceAccessorService = SpringContext.getBean(SequenceAccessorService.class);
    String glcpSearchResultsSequenceNumber = String.valueOf(sequenceAccessorService.getNextAvailableSequenceNumber(KRADConstants.LOOKUP_RESULTS_SEQUENCE));

    SpringContext.getBean(GlCorrectionProcessOriginEntryService.class).persistAllEntries(glcpSearchResultsSequenceNumber, searchResults);
    correctionForm.setGlcpSearchResultsSequenceNumber(glcpSearchResultsSequenceNumber);

    int maxRowsPerPage = CorrectionDocumentUtils.getRecordsPerPage();
    KualiTableRenderFormMetadata originEntrySearchResultTableMetadata = correctionForm.getOriginEntrySearchResultTableMetadata();
    originEntrySearchResultTableMetadata.jumpToFirstPage(correctionForm.getDisplayEntries().size(), maxRowsPerPage);
    originEntrySearchResultTableMetadata.setColumnToSortIndex(-1);
}
 

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

示例10: execute

点赞 2

import org.kuali.rice.kns.web.struts.form.KualiTableRenderFormMetadata; //导入依赖的package包/类
/**
 * This overridden method ...
 * 
 * @see org.kuali.rice.krad.web.struts.action.KualiAction#execute(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
 */
@Override
public ActionForward execute(ActionMapping mapping, ActionForm form,
		HttpServletRequest request, HttpServletResponse response)
		throws Exception {
	IdentityManagementDocumentFormBase idmForm = (IdentityManagementDocumentFormBase) form;
	idmForm.setInquiry(true);

       loadKimObject( request, idmForm );

       KualiTableRenderFormMetadata memberTableMetadata = idmForm.getMemberTableMetadata();
       memberTableMetadata.jumpToPage(memberTableMetadata.getSwitchToPageNumber(), idmForm.getMemberRows().size(), idmForm.getRecordsPerPage());
   	
	return super.execute(mapping, form, request, response);
}
 

开发者ID:kuali,
项目名称:kc-rice,
代码行数:20,
代码来源:IdentityManagementBaseInquiryAction.java

示例11: switchToPage

点赞 2

import org.kuali.rice.kns.web.struts.form.KualiTableRenderFormMetadata; //导入依赖的package包/类
/**
 * @see org.kuali.rice.kns.web.struts.action.KualiTableRenderAction#switchToPage(org.apache.struts.action.ActionMapping,
 *      org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
 */
public ActionForward switchToPage(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
    IdentityManagementDocumentFormBase idmForm = (IdentityManagementDocumentFormBase) form;
    
    KualiTableRenderFormMetadata memberTableMetadata = idmForm.getMemberTableMetadata();
    memberTableMetadata.jumpToPage(memberTableMetadata.getSwitchToPageNumber(), idmForm.getMemberRows().size(), idmForm.getRecordsPerPage());
    memberTableMetadata.setColumnToSortIndex(memberTableMetadata.getPreviouslySortedColumnIndex());
    return mapping.findForward(RiceConstants.MAPPING_BASIC);
}
 

开发者ID:kuali,
项目名称:kc-rice,
代码行数:13,
代码来源:IdentityManagementBaseInquiryAction.java

示例12: execute

点赞 2

import org.kuali.rice.kns.web.struts.form.KualiTableRenderFormMetadata; //导入依赖的package包/类
@Override
public ActionForward execute(ActionMapping mapping, ActionForm form,
        HttpServletRequest request, HttpServletResponse response) throws Exception {
    IdentityManagementRoleDocumentForm roleDocumentForm = (IdentityManagementRoleDocumentForm) form;
    if (roleDocumentForm.getRoleId() == null) {
        String roleId = request.getParameter(KimConstants.PrimaryKeyConstants.SUB_ROLE_ID);
        roleDocumentForm.setRoleId(roleId);
    }
    String kimTypeId = request.getParameter(KimConstants.PrimaryKeyConstants.KIM_TYPE_ID);
    setKimType(kimTypeId, roleDocumentForm);

    KualiTableRenderFormMetadata memberTableMetadata = roleDocumentForm.getMemberTableMetadata();
    if (roleDocumentForm.getRoleDocument()!=null && roleDocumentForm.getMemberRows() != null) {
        memberTableMetadata.jumpToPage(memberTableMetadata.getViewedPageNumber(), roleDocumentForm.getMemberRows().size(), roleDocumentForm.getRecordsPerPage());
        // KULRICE-3972: need to be able to sort by column header like on lookups when editing large roles and groups
        memberTableMetadata.sort(roleDocumentForm.getMemberRows(), roleDocumentForm.getRecordsPerPage());
    }

    // KULRICE-4762: active delegates of "inactivated" role members cause validation problems
    ActionForward forward = promptForAffectedDelegates(mapping, form, request, response,
            roleDocumentForm);
    // if we need to prompt the user due to affected delegates, do so:
    if (forward != null) { return forward; }

    forward = super.execute(mapping, roleDocumentForm, request, response);

    roleDocumentForm.setCanAssignRole(validAssignRole(roleDocumentForm.getRoleDocument()));
    if (KimTypeLookupableHelperServiceImpl.hasDerivedRoleTypeService(roleDocumentForm.getRoleDocument().getKimType())) {
        roleDocumentForm.setCanModifyAssignees(false);
    }
    GlobalVariables.getUserSession().addObject(KimConstants.KimUIConstants.KIM_ROLE_DOCUMENT_SHORT_KEY, roleDocumentForm.getRoleDocument());
    return forward;
}
 

开发者ID:kuali,
项目名称:kc-rice,
代码行数:34,
代码来源:IdentityManagementRoleDocumentAction.java

示例13: clear

点赞 2

import org.kuali.rice.kns.web.struts.form.KualiTableRenderFormMetadata; //导入依赖的package包/类
public ActionForward clear(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
    IdentityManagementRoleDocumentForm roleDocumentForm = (IdentityManagementRoleDocumentForm) form;
    roleDocumentForm.setMemberSearchValue("");
    getUiDocumentService().clearRestrictedRoleMembersSearchResults(roleDocumentForm.getRoleDocument());

    KualiTableRenderFormMetadata memberTableMetadata = roleDocumentForm.getMemberTableMetadata();
    if (roleDocumentForm.getMemberRows() != null) {
        memberTableMetadata.jumpToFirstPage(roleDocumentForm.getMemberRows().size(), roleDocumentForm.getRecordsPerPage());
    }
    return mapping.findForward(RiceConstants.MAPPING_BASIC);
}
 

开发者ID:kuali,
项目名称:kc-rice,
代码行数:12,
代码来源:IdentityManagementRoleDocumentAction.java

示例14: jumpToRoleMember

点赞 2

import org.kuali.rice.kns.web.struts.form.KualiTableRenderFormMetadata; //导入依赖的package包/类
/**
 * @see org.kuali.rice.kns.web.struts.action.KualiTableRenderAction#switchToPage(org.apache.struts.action.ActionMapping,
 *      org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
 */
public ActionForward jumpToRoleMember(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
    IdentityManagementRoleDocumentForm idmForm = (IdentityManagementRoleDocumentForm) form;
    String delegationRoleMemberId = getDelegationRoleMemberToJumpTo(request);
    KualiTableRenderFormMetadata memberTableMetadata = idmForm.getMemberTableMetadata();
    memberTableMetadata.jumpToPage(idmForm.getPageNumberOfRoleMemberId(delegationRoleMemberId),
            idmForm.getMemberRows().size(), idmForm.getRecordsPerPage());
    memberTableMetadata.setColumnToSortIndex(memberTableMetadata.getPreviouslySortedColumnIndex());
    idmForm.setAnchor(delegationRoleMemberId);
    return mapping.findForward(RiceConstants.MAPPING_BASIC);
}
 

开发者ID:kuali,
项目名称:kc-rice,
代码行数:15,
代码来源:IdentityManagementRoleDocumentAction.java

示例15: execute

点赞 2

import org.kuali.rice.kns.web.struts.form.KualiTableRenderFormMetadata; //导入依赖的package包/类
@Override
public ActionForward execute(ActionMapping mapping, ActionForm form,
        HttpServletRequest request, HttpServletResponse response) throws Exception {

    IdentityManagementRoleDocumentForm roleDocumentForm = (IdentityManagementRoleDocumentForm) form;

    ActionForward forward = super.execute(mapping, form, request, response);

    String previouslySortedColumnName = (String)GlobalVariables.getUserSession().retrieveObject(KimConstants.KimUIConstants.KIM_ROLE_INQUIRY_SORT_PREV_COL_NM);
    Boolean sortDescending = ((Boolean)GlobalVariables.getUserSession().retrieveObject(KimConstants.KimUIConstants.KIM_ROLE_INQUIRY_SORT_DESC_VALUE));

    KualiTableRenderFormMetadata memberTableMetadata =  roleDocumentForm.getMemberTableMetadata();
    memberTableMetadata.setPreviouslySortedColumnName(previouslySortedColumnName);
    String columnToSort = memberTableMetadata.getColumnToSortName();
    if  (previouslySortedColumnName != null && StringUtils.isEmpty(columnToSort)) {
        memberTableMetadata.setColumnToSortName(previouslySortedColumnName);
    }
    if (sortDescending != null && !StringUtils.isEmpty(columnToSort)) {
        memberTableMetadata.setSortDescending(sortDescending.booleanValue());
    }
    if (roleDocumentForm.getMemberRows() != null) {
        memberTableMetadata.sort(roleDocumentForm.getMemberRows(), roleDocumentForm.getRecordsPerPage());
        memberTableMetadata.jumpToPage(memberTableMetadata.getSwitchToPageNumber(), roleDocumentForm.getMemberRows().size(), roleDocumentForm.getRecordsPerPage());
    }

    GlobalVariables.getUserSession().addObject(KimConstants.KimUIConstants.KIM_ROLE_INQUIRY_SORT_PREV_COL_NM, memberTableMetadata.getPreviouslySortedColumnName());
    GlobalVariables.getUserSession().addObject(KimConstants.KimUIConstants.KIM_ROLE_INQUIRY_SORT_DESC_VALUE, memberTableMetadata.isSortDescending());

    return forward;
}
 

开发者ID:kuali,
项目名称:kc-rice,
代码行数:31,
代码来源:IdentityManagementRoleInquiry.java

示例16: loadDocument

点赞 2

import org.kuali.rice.kns.web.struts.form.KualiTableRenderFormMetadata; //导入依赖的package包/类
/**
   * This overridden method ...
   * 
   * @see org.kuali.rice.krad.web.struts.action.KualiDocumentActionBase#loadDocument(org.kuali.rice.krad.web.struts.form.KualiDocumentFormBase)
   */
  @Override
  protected void loadDocument(KualiDocumentFormBase form)
  		throws WorkflowException {
  	super.loadDocument(form);
  	
  	IdentityManagementGroupDocumentForm groupDocumentForm = (IdentityManagementGroupDocumentForm) form;
      setKimType(groupDocumentForm.getGroupId(), groupDocumentForm);
      groupDocumentForm.setMember(groupDocumentForm.getGroupDocument().getBlankMember());

KualiTableRenderFormMetadata memberTableMetadata = groupDocumentForm.getMemberTableMetadata();
if (groupDocumentForm.getMemberRows() != null) {
    memberTableMetadata.jumpToFirstPage(groupDocumentForm.getMemberRows().size(), groupDocumentForm.getRecordsPerPage());
}
  }
 

开发者ID:kuali,
项目名称:kc-rice,
代码行数:20,
代码来源:IdentityManagementGroupDocumentAction.java

示例17: switchToPage

点赞 2

import org.kuali.rice.kns.web.struts.form.KualiTableRenderFormMetadata; //导入依赖的package包/类
public ActionForward switchToPage(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
    IdentityManagementDocumentFormBase idmForm = (IdentityManagementDocumentFormBase) form;
    
    KualiTableRenderFormMetadata memberTableMetadata = idmForm.getMemberTableMetadata();
    memberTableMetadata.jumpToPage(memberTableMetadata.getSwitchToPageNumber(), idmForm.getMemberRows().size(), idmForm.getRecordsPerPage());
    memberTableMetadata.setColumnToSortIndex(memberTableMetadata.getPreviouslySortedColumnIndex());
    return mapping.findForward(RiceConstants.MAPPING_BASIC);
}
 

开发者ID:kuali,
项目名称:kc-rice,
代码行数:9,
代码来源:IdentityManagementDocumentActionBase.java

示例18: deleteManualEntry

点赞 2

import org.kuali.rice.kns.web.struts.form.KualiTableRenderFormMetadata; //导入依赖的package包/类
/**
 * Delete a row from the group
 */
public ActionForward deleteManualEntry(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
    LOG.debug("deleteManualEdit() started");

    CorrectionForm correctionForm = (CorrectionForm) form;
    GeneralLedgerCorrectionProcessDocument document = correctionForm.getCorrectionDocument();
    int entryId = Integer.parseInt(getImageContext(request, "entryId"));

    // Find it and remove it
    for (Iterator iter = correctionForm.getAllEntries().iterator(); iter.hasNext();) {
        OriginEntryFull element = (OriginEntryFull) iter.next();
        if (element.getEntryId() == entryId) {
            iter.remove();
            break;
        }
    }

    // Calculate the debit/credit/row count
    updateDocumentSummary(document, correctionForm.getAllEntries(), correctionForm.isRestrictedFunctionalityMode());

    correctionForm.setShowSummaryOutputFlag(true);

    // we've modified the list of all entries, so repersist it
    SpringContext.getBean(GlCorrectionProcessOriginEntryService.class).persistAllEntries(correctionForm.getGlcpSearchResultsSequenceNumber(), correctionForm.getAllEntries());
    correctionForm.setDisplayEntries(new ArrayList<OriginEntryFull>(correctionForm.getAllEntries()));
    if (correctionForm.getShowOutputFlag()) {
        removeNonMatchingEntries(correctionForm.getDisplayEntries(), document.getCorrectionChangeGroup());
    }

    KualiTableRenderFormMetadata originEntrySearchResultTableMetadata = correctionForm.getOriginEntrySearchResultTableMetadata();

    // list has changed, we'll need to repage and resort
    applyPagingAndSortingFromPreviousPageView(correctionForm);
    return mapping.findForward(OLEConstants.MAPPING_BASIC);
}
 

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

示例19: switchToPage

点赞 2

import org.kuali.rice.kns.web.struts.form.KualiTableRenderFormMetadata; //导入依赖的package包/类
/**
 * @see org.kuali.rice.kns.web.struts.action.KualiTableAction#switchToPage(org.apache.struts.action.ActionMapping,
 *      org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
 */
@Override
public ActionForward switchToPage(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
    CorrectionForm correctionForm = (CorrectionForm) form;
    int maxRowsPerPage = CorrectionDocumentUtils.getRecordsPerPage();
    KualiTableRenderFormMetadata originEntrySearchResultTableMetadata = correctionForm.getOriginEntrySearchResultTableMetadata();
    originEntrySearchResultTableMetadata.jumpToPage(originEntrySearchResultTableMetadata.getSwitchToPageNumber(), correctionForm.getDisplayEntries().size(), maxRowsPerPage);
    originEntrySearchResultTableMetadata.setColumnToSortIndex(originEntrySearchResultTableMetadata.getPreviouslySortedColumnIndex());
    return mapping.findForward(OLEConstants.MAPPING_BASIC);
}
 

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

示例20: sort

点赞 2

import org.kuali.rice.kns.web.struts.form.KualiTableRenderFormMetadata; //导入依赖的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

示例21: applyPagingAndSortingFromPreviousPageView

点赞 2

import org.kuali.rice.kns.web.struts.form.KualiTableRenderFormMetadata; //导入依赖的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

示例22: switchToPage

点赞 2

import org.kuali.rice.kns.web.struts.form.KualiTableRenderFormMetadata; //导入依赖的package包/类
@Override
public ActionForward switchToPage(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
    TemCorrectionForm correctionForm = (TemCorrectionForm) form;
    int maxRowsPerPage = MAX_ROWS;
    KualiTableRenderFormMetadata agencyEntrySearchResultTableMetadata = correctionForm.getAgencyEntrySearchResultTableMetadata();
    agencyEntrySearchResultTableMetadata.jumpToPage(agencyEntrySearchResultTableMetadata.getSwitchToPageNumber(), correctionForm.getDisplayEntries().size(), maxRowsPerPage);
    agencyEntrySearchResultTableMetadata.setColumnToSortIndex(agencyEntrySearchResultTableMetadata.getPreviouslySortedColumnIndex());
    return mapping.findForward(KFSConstants.MAPPING_BASIC);
}
 

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

示例23: sort

点赞 2

import org.kuali.rice.kns.web.struts.form.KualiTableRenderFormMetadata; //导入依赖的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

示例24: loadAllEntries

点赞 2

import org.kuali.rice.kns.web.struts.form.KualiTableRenderFormMetadata; //导入依赖的package包/类
/**
 * Show all entries for Manual edit with groupId and persist these entries to the DB The restricted functionality mode flag MUST
 * BE SET PRIOR TO CALLING this method.
 *
 * @param groupId
 * @param correctionForm
 * @throws Exception
 */
protected void loadAllEntries(String fileNameWithPath, TemCorrectionForm correctionForm) {
    LOG.debug("loadAllEntries() started");
    TemCorrectionProcessDocument document = correctionForm.getCorrectionDocument();

    if (!correctionForm.isRestrictedFunctionalityMode()) {
        List<AgencyEntryFull> searchResults = new ArrayList();
        Map loadErrorMap = agencyEntryService.getEntriesByGroupIdWithPath(fileNameWithPath, searchResults);
        correctionForm.setAllEntries(searchResults);
        int maxRowsPerPage = MAX_ROWS;
        KualiTableRenderFormMetadata agencyEntrySearchResultTableMetadata = correctionForm.getAgencyEntrySearchResultTableMetadata();
        agencyEntrySearchResultTableMetadata.jumpToFirstPage(correctionForm.getAllEntries().size(), maxRowsPerPage);

        // put errors on GlobalVariables
        if (loadErrorMap != null && loadErrorMap.size() > 0) {
            Iterator iter = loadErrorMap.keySet().iterator();
            while (iter.hasNext()) {
                Integer lineNumber = (Integer) iter.next();
                List<Message> messageList = (List<Message>) loadErrorMap.get(lineNumber);
                for (Message errorMmessage : messageList) {
                    GlobalVariables.getMessageMap().putError("fileUpload", KFSKeyConstants.ERROR_INVALID_FORMAT_ORIGIN_ENTRY_FROM_TEXT_FILE, new String[] { lineNumber.toString(), errorMmessage.toString() });
                }
            }
        }
        else {
            try {
                loadAllEntries(searchResults, correctionForm);

            }
            catch (Exception e) {
                throw new RuntimeException(e);
            }
        }
    }
}
 

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

示例25: applyPagingAndSortingFromPreviousPageView

点赞 2

import org.kuali.rice.kns.web.struts.form.KualiTableRenderFormMetadata; //导入依赖的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

示例26: sort

点赞 2

import org.kuali.rice.kns.web.struts.form.KualiTableRenderFormMetadata; //导入依赖的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

示例27: applyPagingAndSortingFromPreviousPageView

点赞 2

import org.kuali.rice.kns.web.struts.form.KualiTableRenderFormMetadata; //导入依赖的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


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)