Entering content frame

Procedure documentation Creating a Resource Bundle for the File Structure

You want the structure of the file system simulated in the tree to be saved in a resource bundle. This resource bundle contains all specifications on the folders and files that exist in the file system.

 

Procedure

Add a new directory resources in the src/packages/com/sap/tut/wd/tree/ directory.

...

       1.      Switch to the Package Explorer and choose the nodes Tut_WD_Tree ® src/packages ® com.sap.tut.wd.tree.

       2.      In the context menu, choose New ® Other.

       3.      In the dialog box that appears, choose Java (left side) – This graphic is explained in the accompanying textPackage (right side).

       4.      Choose Next. In the window that appears, enter the Package name com.sap.tut.wd.tree.resources.

       5.      To complete this procedure, choose Finish.

 

Save the file Filesystem.properties in the directory that you just created.

1.       Select the node Tut_WD_Tree ® src/packages ® com.sap.tut.wd.tree.resources and, in the context menu, choose New ®Other.

2.       In the dialog box that appears, choose Simple (left side) – This graphic is explained in the accompanying text File (right side).

3.       Choose Next. In the window that appears, enter the file name Filesystem.properties.

4.       Choose Finish.

5.       Enter the following lines in the text file and save the text file.

Filesystem.properties: Resource bundle for the file system

(in the directory src/packages/com/sap/tut/wd/tree/resources)

##############################################################

##

## Filesystem resources for Web Dynpro Tutorial Tree

##

##############################################################

 

Drives = C;D

C = Documents;Program_Files;Temp;Windows;start.bat

Documents = Word;calc.xls;db.mdb

Word = first.doc;second.doc

Program_Files = Winzip;Accessories

Winzip = wz.com;wzinst.hlp;test.zip

Accessories = calculator.exe;notepad.exe;paint.exe

Windows = Java;Temporary_Internet_Files

Java = app.java;app.class

Temporary_Internet_Files = cookie1.txt;cookie2.txt;cookie3.txt;cookie4.txt

D = Games

Games = Soccer;Chess

Soccer = soccer.exe;field.lnd

Chess = chess.exe

 

Result

You have created a directory called resources in the current project. You have created a resource bundle in this directory for the simulation of the file system with the name Filesystem.properties. You use this file in the next step to display a file structure in the tree.

Next step:

Initializing the Context

  

 

Leaving content frame