# NestingPageFlowController.jpf Sample

This topic inludes the source code for the NestingPageFlowController.jpf Sample.

## Sample Location

This sample is located in the following directory in your WebLogic Workshop installation:

BEA_HOME/weblogic81/samples/workshop/SamplesApp/WebApp/navigation/nesting/nestingPageFlow/

## Sample Source Code

`001 package navigation.nesting.nestingPageFlow; 002 import com.bea.wlw.netui.pageflow.Forward; 003 import com.bea.wlw.netui.pageflow.PageFlowController; 004 import navigation.nesting.nestedPageFlow.NestedPageFlowController.ProfileForm; 005 006 /** 007 * @jpf:controller 008 * @jpf:view-properties view-properties:: 009 * <!-- This data is auto-generated. Hand-editing this section is not recommended. --> 010 * <view-properties> 011 * <pageflow-object id="pageflow:/navigation/nesting/nestingPageFlow/NestingPageFlowController.jpf"/> 012 * <pageflow-object id="action:begin.do"> 013 * <property value="80" name="x"/> 014 * <property value="100" name="y"/> 015 * </pageflow-object> 016 * <pageflow-object id="action:toNestedPageFlow.do"> 017 * <property value="180" name="x"/> 018 * <property value="200" name="y"/> 019 * </pageflow-object> 020 * <pageflow-object id="action:showProfile.do#navigation.nesting.nestedPageFlow.NestedPageFlowController.ProfileForm"> 021 * <property value="180" name="x"/> 022 * <property value="420" name="y"/> 023 * </pageflow-object> 024 * <pageflow-object id="action-call:@page:index.jsp@#@action:toNestedPageFlow.do@"> 025 * <property value="180,180,180,180" name="elbowsX"/> 026 * <property value="144,150,150,156" name="elbowsY"/> 027 * <property value="South_1" name="fromPort"/> 028 * <property value="North_1" name="toPort"/> 029 * </pageflow-object> 030 * <pageflow-object id="page:index.jsp"> 031 * <property value="180" name="x"/> 032 * <property value="100" name="y"/> 033 * </pageflow-object> 034 * <pageflow-object id="action-call:@external-jpf:/navigation/nesting/nestedPageFlow/NestedPageFlowController.jpf@#@action:showProfile.do#navigation.nesting.nestedPageFlow.NestedPageFlowController.ProfileForm@"> 035 * <property value="180,180,180,180" name="elbowsX"/> 036 * <property value="364,370,370,376" name="elbowsY"/> 037 * <property value="South_1" name="fromPort"/> 038 * <property value="North_1" name="toPort"/> 039 * </pageflow-object> 040 * <pageflow-object id="external-jpf:/navigation/nesting/nestedPageFlow/NestedPageFlowController.jpf"> 041 * <property value="180" name="x"/> 042 * <property value="320" name="y"/> 043 * </pageflow-object> 044 * <pageflow-object id="action-call:@page:showProfile.jsp@#@action:begin.do@"> 045 * <property value="80,80,80,80" name="elbowsX"/> 046 * <property value="376,260,260,144" name="elbowsY"/> 047 * <property value="North_1" name="fromPort"/> 048 * <property value="South_1" name="toPort"/> 049 * </pageflow-object> 050 * <pageflow-object id="page:showProfile.jsp"> 051 * <property value="80" name="x"/> 052 * <property value="420" name="y"/> 053 * </pageflow-object> 054 * <pageflow-object id="forward:path#success#index.jsp#@action:begin.do@"> 055 * <property value="116,130,130,144" name="elbowsX"/> 056 * <property value="92,92,92,92" name="elbowsY"/> 057 * <property value="East_1" name="fromPort"/> 058 * <property value="West_1" name="toPort"/> 059 * <property value="success" name="label"/> 060 * </pageflow-object> 061 * <pageflow-object id="forward:path#success#/navigation/nesting/nestedPageFlow/NestedPageFlowController.jpf#@action:toNestedPageFlow.do@"> 062 * <property value="180,180,180,180" name="elbowsX"/> 063 * <property value="244,260,260,276" name="elbowsY"/> 064 * <property value="South_1" name="fromPort"/> 065 * <property value="North_1" name="toPort"/> 066 * <property value="success" name="label"/> 067 * </pageflow-object> 068 * <pageflow-object id="forward:path#success#showProfile.jsp#@action:showProfile.do#navigation.nesting.nestedPageFlow.NestedPageFlowController.ProfileForm@"> 069 * <property value="144,130,130,116" name="elbowsX"/> 070 * <property value="412,412,412,412" name="elbowsY"/> 071 * <property value="West_1" name="fromPort"/> 072 * <property value="East_1" name="toPort"/> 073 * <property value="success" name="label"/> 074 * </pageflow-object> 075 * </view-properties> 076 * :: 077 */ 078 public class NestingPageFlowController extends PageFlowController 079 { 080 081 082 // Uncomment this declaration to access Global.app. 083 // 084 // protected global.Global globalApp; 085 // 086 087 // For an example of page flow exception handling see the example "catch" and "exception-handler" 088 // annotations in {project}/WEB-INF/src/global/Global.app 089 090 /** 091 * This method represents the point of entry into the pageflow 092 * @jpf:action 093 * @jpf:forward name="success" path="index.jsp" 094 */ 095 protected Forward begin() 096 { 097 return new Forward("success"); 098 } 099 100 /** 101 * @jpf:action 102 * @jpf:forward name="success" path="/navigation/nesting/nestedPageFlow/NestedPageFlowController.jpf" 103 */ 104 protected Forward toNestedPageFlow() 105 { 106 return new Forward("success"); 107 } 108 109 /** 110 * @jpf:action 111 * @jpf:forward name="success" path="showProfile.jsp" 112 */ 113 protected Forward showProfile(ProfileForm form) 114 { 115 // Store the profile data in the Request object. 116 getRequest().setAttribute("profile", form); 117 118 return new Forward("success"); 119 } 120 }`