本文整理汇总了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;
}
示例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;
}
示例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);
}
示例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);
}