01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: *
17: * $Header:$
18: */
19: package org.apache.beehive.netui.pageflow;
20:
21: /**
22: * Exception that occurs when the user invokes an action in a nested page flow that uses a
23: * <code>{@link org.apache.beehive.netui.pageflow.annotations.Jpf.Forward @Jpf.Forward}(</code>...<code>
24: * returnAction="</code><i>action-name-in-calling-pageflow</i><code>")</code>
25: * annotation, but there is no calling page flow. This can happen in iterative
26: * development mode when you have modified files and caused the web application to be redeployed,
27: * or when the session expires.
28: */
29: public class EmptyNestingStackException extends PageFlowException {
30: public EmptyNestingStackException(String actionName,
31: FlowController fc) {
32: super (actionName, fc);
33: }
34:
35: protected Object[] getMessageArgs() {
36: return new Object[] { getActionName(), getFlowControllerURI() };
37: }
38:
39: protected String[] getMessageParts() {
40: return new String[] {
41: "Empty nesting stack for returned action ",
42: " from Page Flow ", "." };
43: }
44:
45: /**
46: * Tell whether the root cause may be session expiration in cases where the requested session ID is different than
47: * the actual session ID. In this case, the answer is <code>true</code>.
48: */
49: public boolean causeMayBeSessionExpiration() {
50: return true;
51: }
52: }
|