# TextAreaController.jpf Sample

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

## Sample Location

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

BEA_HOME/weblogic81/samples/workshop/SamplesApp/WebApp/tagSamples/netui/textArea/

## Sample Source Code

`001 package tagSamples.netui.textArea; 002 import com.bea.wlw.netui.pageflow.FormData; 003 import com.bea.wlw.netui.pageflow.Forward; 004 import com.bea.wlw.netui.pageflow.PageFlowController; 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:/tagSamples/netui/textArea/TextAreaController.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="page:index.jsp"> 017 * <property value="240" name="x"/> 018 * <property value="100" name="y"/> 019 * </pageflow-object> 020 * <pageflow-object id="forward:path#success#index.jsp#@action:begin.do@"> 021 * <property value="116,160,160,204" name="elbowsX"/> 022 * <property value="92,92,92,92" name="elbowsY"/> 023 * <property value="East_1" name="fromPort"/> 024 * <property value="West_1" name="toPort"/> 025 * <property value="success" name="label"/> 026 * </pageflow-object> 027 * <pageflow-object id="formbean:tagSamples.netui.textArea.TextAreaController.ProcessTextForm"/> 028 * <pageflow-object id="formbeanprop:tagSamples.netui.textArea.TextAreaController.ProcessTextForm#text#java.lang.String"/> 029 * <pageflow-object id="action:processText.do#tagSamples.netui.textArea.TextAreaController.ProcessTextForm"> 030 * <property value="380" name="x"/> 031 * <property value="100" name="y"/> 032 * </pageflow-object> 033 * <pageflow-object id="action-call:@page:index.jsp@#@action:processText.do#tagSamples.netui.textArea.TextAreaController.ProcessTextForm@"> 034 * <property value="276,310,310,344" name="elbowsX"/> 035 * <property value="92,92,92,92" name="elbowsY"/> 036 * <property value="East_1" name="fromPort"/> 037 * <property value="West_1" name="toPort"/> 038 * </pageflow-object> 039 * <pageflow-object id="page:showText.jsp"> 040 * <property value="540" name="x"/> 041 * <property value="100" name="y"/> 042 * </pageflow-object> 043 * <pageflow-object id="forward:path#success#showText.jsp#@action:processText.do#tagSamples.netui.textArea.TextAreaController.ProcessTextForm@"> 044 * <property value="416,460,460,504" name="elbowsX"/> 045 * <property value="92,92,92,92" name="elbowsY"/> 046 * <property value="East_1" name="fromPort"/> 047 * <property value="West_1" name="toPort"/> 048 * <property value="success" name="label"/> 049 * </pageflow-object> 050 * <pageflow-object id="action:backToIndex.do"> 051 * <property value="540" name="x"/> 052 * <property value="260" name="y"/> 053 * </pageflow-object> 054 * <pageflow-object id="action-call:@page:showText.jsp@#@action:backToIndex.do@"> 055 * <property value="540,540,540,540" name="elbowsX"/> 056 * <property value="144,180,180,216" name="elbowsY"/> 057 * <property value="South_1" name="fromPort"/> 058 * <property value="North_1" name="toPort"/> 059 * </pageflow-object> 060 * <pageflow-object id="forward:path#success#index.jsp#@action:backToIndex.do@"> 061 * <property value="504,240,240,240" name="elbowsX"/> 062 * <property value="252,252,198,144" name="elbowsY"/> 063 * <property value="West_1" name="fromPort"/> 064 * <property value="South_1" name="toPort"/> 065 * <property value="success" name="label"/> 066 * </pageflow-object> 067 * </view-properties> 068 * :: 069 */ 070 public class TextAreaController extends PageFlowController 071 { 072 /** 073 * @jpf:action 074 * @jpf:forward name="success" path="index.jsp" 075 */ 076 protected Forward begin() 077 { 078 return new Forward("success"); 079 } 080 081 /** 082 * @jpf:action 083 * @jpf:forward name="success" path="showText.jsp" 084 */ 085 protected Forward processText(ProcessTextForm form) 086 { 087 // Convert the text to uppercase, and store it in the Request object. 088 getRequest().setAttribute("text", form.text.toUpperCase()); 089 return new Forward("success"); 090 } 091 092 /** 093 * @jpf:action 094 * @jpf:forward name="success" path="index.jsp" 095 */ 096 protected Forward backToIndex() 097 { 098 return new Forward("success"); 099 } 100 101 /** 102 * FormData get and set methods may be overwritten by the Form Bean editor. 103 */ 104 public static class ProcessTextForm extends FormData 105 { 106 private String text; 107 108 public void setText(String text) 109 { 110 this.text = text; 111 } 112 113 public String getText() 114 { 115 return this.text; 116 } 117 } 118 }`