本文整理了Java中org.springframework.webflow.engine.Flow.getCurrentTransitionableState()
方法的一些代码示例,展示了Flow.getCurrentTransitionableState()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Flow.getCurrentTransitionableState()
方法的具体详情如下:
包路径:org.springframework.webflow.engine.Flow
类名称:Flow
方法名:getCurrentTransitionableState
[英]Returns the current state and makes sure it is transitionable.
[中]返回当前状态并确保其可传递。
代码示例来源:origin: org.springframework.webflow/spring-webflow
/**
* Handle the last event that occurred against an active session of this flow.
* @param context the flow execution control context
*/
public boolean handleEvent(RequestControlContext context) {
TransitionableState currentState = getCurrentTransitionableState(context);
try {
return currentState.handleEvent(context);
} catch (NoMatchingTransitionException e) {
// try the flow level transition set for a match
Transition transition = globalTransitionSet.getTransition(context);
if (transition != null) {
return context.execute(transition);
// return transition.execute(currentState, context);
} else {
// no matching global transition => let the original exception
// propagate
throw e;
}
}
}
代码示例来源:origin: spring-projects/spring-webflow
/**
* Handle the last event that occurred against an active session of this flow.
* @param context the flow execution control context
*/
public boolean handleEvent(RequestControlContext context) {
TransitionableState currentState = getCurrentTransitionableState(context);
try {
return currentState.handleEvent(context);
} catch (NoMatchingTransitionException e) {
// try the flow level transition set for a match
Transition transition = globalTransitionSet.getTransition(context);
if (transition != null) {
return context.execute(transition);
// return transition.execute(currentState, context);
} else {
// no matching global transition => let the original exception
// propagate
throw e;
}
}
}
代码示例来源:origin: org.springframework/spring-webflow
/**
* Inform this flow definition that an event was signaled in the current state of an active flow execution. The
* signaled event is the last event available in given request context ({@link RequestContext#getLastEvent()}).
* @param context the flow execution control context
* @return the selected view
* @throws FlowExecutionException when an exception occurs processing the event
*/
public ViewSelection onEvent(RequestControlContext context) throws FlowExecutionException {
TransitionableState currentState = getCurrentTransitionableState(context);
try {
return currentState.onEvent(context);
} catch (NoMatchingTransitionException e) {
// try the flow level transition set for a match
Transition transition = globalTransitionSet.getTransition(context);
if (transition != null) {
return transition.execute(currentState, context);
} else {
// no matching global transition => let the original exception
// propagate
throw e;
}
}
}
代码示例来源:origin: org.springframework.webflow/org.springframework.webflow
/**
* Handle the last event that occurred against an active session of this flow.
* @param context the flow execution control context
*/
public boolean handleEvent(RequestControlContext context) {
TransitionableState currentState = getCurrentTransitionableState(context);
try {
return currentState.handleEvent(context);
} catch (NoMatchingTransitionException e) {
// try the flow level transition set for a match
Transition transition = globalTransitionSet.getTransition(context);
if (transition != null) {
return context.execute(transition);
// return transition.execute(currentState, context);
} else {
// no matching global transition => let the original exception
// propagate
throw e;
}
}
}
内容来源于网络,如有侵权,请联系作者删除!