当前位置: 首页>>代码示例>>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;未经允许,请勿转载。