# SimpleSubmitController.jpf Sample

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

## Sample Location

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

BEA_HOME/weblogic81/samples/workshop/SamplesApp/WebApp/handlingData/simpleSubmit/

## Sample Source Code

`01 package handlingData.simpleSubmit; 02 import com.bea.wlw.netui.pageflow.FormData; 03 import com.bea.wlw.netui.pageflow.Forward; 04 import com.bea.wlw.netui.pageflow.PageFlowController; 05 06 /** 07 * @jpf:controller 08 * @jpf:view-properties view-properties:: 09 * <!-- This data is auto-generated. Hand-editing this section is not recommended. --> 10 * <view-properties> 11 * <pageflow-object id="pageflow:/handlingData/simpleSubmit/SimpleSubmitController.jpf"/> 12 * <pageflow-object id="action:begin.do"> 13 * <property value="80" name="x"/> 14 * <property value="100" name="y"/> 15 * </pageflow-object> 16 * <pageflow-object id="page:index.jsp"> 17 * <property value="240" name="x"/> 18 * <property value="100" name="y"/> 19 * </pageflow-object> 20 * <pageflow-object id="forward:path#success#index.jsp#@action:begin.do@"> 21 * <property value="116,160,160,204" name="elbowsX"/> 22 * <property value="92,92,92,92" name="elbowsY"/> 23 * <property value="East_1" name="fromPort"/> 24 * <property value="West_1" name="toPort"/> 25 * <property value="success" name="label"/> 26 * </pageflow-object> 27 * <pageflow-object id="formbean:handlingData.simpleSubmit.SimpleSubmitController.SubmitNameForm"/> 28 * <pageflow-object id="action:SubmitName.do#handlingData.simpleSubmit.SimpleSubmitController.SubmitNameForm"> 29 * <property value="360" name="x"/> 30 * <property value="100" name="y"/> 31 * </pageflow-object> 32 * <pageflow-object id="formbeanprop:handlingData.simpleSubmit.SimpleSubmitController.SubmitNameForm#name#java.lang.String"/> 33 * <pageflow-object id="page:showName.jsp"> 34 * <property value="460" name="x"/> 35 * <property value="100" name="y"/> 36 * </pageflow-object> 37 * <pageflow-object id="forward:path#success#showName.jsp#@action:SubmitName.do#handlingData.simpleSubmit.SimpleSubmitController.SubmitNameForm@"> 38 * <property value="396,410,410,424" name="elbowsX"/> 39 * <property value="92,92,92,92" name="elbowsY"/> 40 * <property value="East_1" name="fromPort"/> 41 * <property value="West_1" name="toPort"/> 42 * <property value="success" name="label"/> 43 * </pageflow-object> 44 * <pageflow-object id="action-call:@page:index.jsp@#@action:SubmitName.do#handlingData.simpleSubmit.SimpleSubmitController.SubmitNameForm@"> 45 * <property value="276,300,300,324" name="elbowsX"/> 46 * <property value="92,92,92,92" name="elbowsY"/> 47 * <property value="East_1" name="fromPort"/> 48 * <property value="West_1" name="toPort"/> 49 * </pageflow-object> 50 * </view-properties> 51 * :: 52 */ 53 public class SimpleSubmitController extends PageFlowController 54 { 55 56 /** 57 * @jpf:action 58 * @jpf:forward name="success" path="index.jsp" 59 */ 60 protected Forward begin() 61 { 62 return new Forward("success"); 63 } 64 65 /** 66 * @jpf:action 67 * @jpf:forward name="success" path="showName.jsp" 68 */ 69 protected Forward SubmitName(SubmitNameForm form) 70 { 71 getRequest().setAttribute("name", form.getName()); 72 return new Forward("success"); 73 } 74 75 public static class SubmitNameForm extends FormData 76 { 77 private String name; 78 79 public void setName(String name) 80 { 81 this.name = name; 82 } 83 84 public String getName() 85 { 86 return this.name; 87 } 88 } 89 }`