Index: openacs-4/packages/acs-core-docs/www/subsites.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/subsites.html,v diff -u -r1.48.2.12 -r1.48.2.13 --- openacs-4/packages/acs-core-docs/www/subsites.html 19 Nov 2016 09:21:55 -0000 1.48.2.12 +++ openacs-4/packages/acs-core-docs/www/subsites.html 6 Jan 2017 09:18:42 -0000 1.48.2.13 @@ -3,11 +3,11 @@ OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.

Overview

-In this document, we'll examine the user interface pages of the Notes +In this document, we'll examine the user interface pages of the Notes application in more detail, covering two separate aspects of page -development in OpenACS. First, we'll talk about the code needed to make +development in OpenACS. First, we'll talk about the code needed to make your pages aware of which application instance they are running -in. Second, we'll talk about using the form builder to develop +in. Second, we'll talk about using the form builder to develop form-based user interfaces in OpenACS. While these seem like unrelated topics, they both come up in the example page that we are going to look at, so it makes sense to address them at the same time. @@ -20,7 +20,7 @@ application instances to particular URLs within a site. We call creating such a mapping mounting the application instance at a particular URL. The tutorial also showed how a given URL is -translated into a physical file to serve using the site map. We'll +translated into a physical file to serve using the site map. We'll repeat this description here, assuming that you have mounted an instance of Notes at the URL /notes as we did in the packages-example:

In the Notes example, we are particularly interested in the package_id field. If you study the data model and code, -you'll see why. As we said before in the data modeling tutorial, the Notes application points the +you'll see why. As we said before in the data modeling tutorial, the Notes application points the context_id of each Note object that it creates to the package instance that created it. That is, the context_id corresponds exactly to the package_id that comes in from @@ -123,7 +123,7 @@ template system. This API allows you to write forms-based pages without generating a lot of duplicated HTML in your pages. It also encapsulates most of the common logic that we use in dealing with -forms, which we'll discuss next. +forms, which we'll discuss next.

Using Forms

The forms API is pretty simple: You use calls in the template::form namespace in your Tcl script to create @@ -238,7 +238,7 @@ }

-In this simple example, we don't do any custom validation. The nice +In this simple example, we don't do any custom validation. The nice thing about using this API is that the forms library handles all of the HTML rendering, input validation and database transaction logic on your behalf. This means that you can write pages without duplicating @@ -249,7 +249,7 @@ repository, mount an instance of Notes somewhere in your server and then try out the user interface pages. It should become clear that in a real site, you would be able to, say, create a custom instance of -Notes for every registered user, mount that instance at the user's +Notes for every registered user, mount that instance at the user's home page, and set up the permissions so that the instance is only visible to that user. The end result is a site where users can come and write notes to themselves. @@ -272,6 +272,6 @@ appears to provide each user in a system with their own private notes database.

-We also saw how to use the templating system's forms API in a simple +We also saw how to use the templating system's forms API in a simple way, to create forms based pages with minimal duplication of code.

($Id$)