Now that you have added functions to Folders.csp that can retrieve the InfoStore
object and list both child folders and parent folders, you are almost ready to display your results.
However, before you can begin using these functions, you need to retrieve a critical piece of information: the ID
of the current folder that you wish to display. Where can you retrieve the current folder ID
? It must be specified by the user. It makes sense then to display the folders at the root of the folder tree so that the user can navigate through them and choose the one that she wants to view.
Like ASP, CSP pages are able to pass arguments from page to page using a
query stringa URL request that is attached by a question mark symbol. For example, if you were to enter the URL http://myWebServer/test.csp?Variable=10
, the page test.csp
on myWebServer
would be loaded and handed the parameter Variable
that has a value of 10.
A similar query string is used in the Folders page. When the page is initially loaded, the URL will read "http://myAPS/Folders.csp?FolderID=0
". This will instruct the Folders.csp page to display all the folders whose parent's ID
number is zero (that is, all the topID
of that folder is used to load the page again, thus displaying the new folder's ID. The next step explains how this is done.
Retrieving the current folder ID
Crystal Decisions, Inc. http://www.crystaldecisions.com Support services: http://support.crystaldecisions.com |