當前位置: 首頁>>代碼示例>>Java>>正文


Java PropositionBo.getEditMode方法代碼示例

本文整理匯總了Java中org.kuali.rice.krms.impl.repository.PropositionBo.getEditMode方法的典型用法代碼示例。如果您正苦於以下問題:Java PropositionBo.getEditMode方法的具體用法?Java PropositionBo.getEditMode怎麽用?Java PropositionBo.getEditMode使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.kuali.rice.krms.impl.repository.PropositionBo的用法示例。


在下文中一共展示了PropositionBo.getEditMode方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: findPropositionUnderEdit

import org.kuali.rice.krms.impl.repository.PropositionBo; //導入方法依賴的package包/類
/**
 * helper method to find the proposition under edit
 */
private PropositionBo findPropositionUnderEdit(PropositionBo currentProposition) {
    PropositionBo result = null;
    if (currentProposition.getEditMode()) {
        result = currentProposition;
    } else {
        if (currentProposition.getCompoundComponents() != null) {
            for (PropositionBo child : currentProposition.getCompoundComponents()) {
                result = findPropositionUnderEdit(child);
                if (result != null) break;
            }
        }
    }

    return result;
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:19,代碼來源:ValidTermsValuesFinder.java

示例2: findPropositionUnderEdit

import org.kuali.rice.krms.impl.repository.PropositionBo; //導入方法依賴的package包/類
/**
 * helper method to find the proposition under edit
 */
private PropositionBo findPropositionUnderEdit(PropositionBo currentProposition) {
    PropositionBo result = null;
    if (currentProposition.getEditMode()) {
        result = currentProposition;
    } else {
        if (currentProposition.getCompoundComponents() != null) {
            for (PropositionBo child : currentProposition.getCompoundComponents()) {
                result = findPropositionUnderEdit(child);
                if (result != null) break;
            }
        }
    }
    return result;
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:18,代碼來源:ValidTermsForPropositionValuesFinder.java

示例3: goToEditProposition

import org.kuali.rice.krms.impl.repository.PropositionBo; //導入方法依賴的package包/類
/**
 * This method starts an edit proposition.
 */
@RequestMapping(params = "methodToCall=" + "goToEditProposition")
public ModelAndView goToEditProposition(@ModelAttribute("KualiForm") UifFormBase form, BindingResult result,
        HttpServletRequest request, HttpServletResponse response) throws Exception {

    // open the selected node for editing
    AgendaEditor agendaEditor = getAgendaEditor(form);
    RuleBo rule = agendaEditor.getAgendaItemLine().getRule();
    String selectedPropId = agendaEditor.getSelectedPropositionId();

    Node<RuleTreeNode,String> root = rule.getPropositionTree().getRootElement();
    PropositionBo propositionToToggleEdit = null;
    boolean newEditMode = true;

    // find parent
    Node<RuleTreeNode,String> parent = findParentPropositionNode( root, selectedPropId);
    if (parent != null){
        List<Node<RuleTreeNode,String>> children = parent.getChildren();
        for( int index=0; index< children.size(); index++){
            Node<RuleTreeNode,String> child = children.get(index);
            if (propIdMatches(child, selectedPropId)){
                PropositionBo prop = child.getData().getProposition();
                propositionToToggleEdit = prop;
                newEditMode =  !prop.getEditMode();
                break;
            } else {
                child.getData().getProposition().setEditMode(false);
            }
        }
    }

    resetEditModeOnPropositionTree(root);
    if (propositionToToggleEdit != null) {
        propositionToToggleEdit.setEditMode(newEditMode);
        //refresh the tree
        rule.refreshPropositionTree(null);
    }

    return getModelAndView(form);
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:43,代碼來源:AgendaEditorController.java

示例4: goToEditProposition

import org.kuali.rice.krms.impl.repository.PropositionBo; //導入方法依賴的package包/類
/**
 * This method starts an edit proposition.
 */
@RequestMapping(params = "methodToCall=" + "goToEditProposition")
public ModelAndView goToEditProposition(@ModelAttribute("KualiForm") UifFormBase form, BindingResult result,
        HttpServletRequest request, HttpServletResponse response) throws Exception {

    // open the selected node for editing
    AgendaEditor agendaEditor = getAgendaEditor(form);
    RuleBo rule = agendaEditor.getAgendaItemLine().getRule();
    String selectedPropId = agendaEditor.getSelectedPropositionId();

    Node<RuleTreeNode,String> root = rule.getPropositionTree().getRootElement();
    PropositionBo propositionToToggleEdit = null;
    boolean newEditMode = true;

    // find parent
    Node<RuleTreeNode,String> parent = findParentPropositionNode( root, selectedPropId);
    if (parent != null){
        List<Node<RuleTreeNode,String>> children = parent.getChildren();
        for( int index=0; index< children.size(); index++){
            Node<RuleTreeNode,String> child = children.get(index);
            if (propIdMatches(child, selectedPropId)){
                PropositionBo prop = child.getData().getProposition();
                propositionToToggleEdit = prop;
                newEditMode =  !prop.getEditMode();
                break;
            } else {
                child.getData().getProposition().setEditMode(false);
            }
        }
    }

    resetEditModeOnPropositionTree(root);
    if (propositionToToggleEdit != null) {
        propositionToToggleEdit.setEditMode(newEditMode);
        //refresh the tree
        rule.refreshPropositionTree(null);
    }

    return getUIFModelAndView(form);
}
 
開發者ID:aapotts,項目名稱:kuali_rice,代碼行數:43,代碼來源:AgendaEditorController.java


注:本文中的org.kuali.rice.krms.impl.repository.PropositionBo.getEditMode方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。