Index: openacs-4/packages/acs-core-docs/www/subsites.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/subsites.adp,v diff -u -r1.1.2.4 -r1.1.2.5 --- openacs-4/packages/acs-core-docs/www/subsites.adp 9 Jun 2016 13:03:11 -0000 1.1.2.4 +++ openacs-4/packages/acs-core-docs/www/subsites.adp 23 Jun 2016 08:32:46 -0000 1.1.2.5 @@ -14,15 +14,15 @@ 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 application in more detail, covering two separate aspects of -page 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 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.

+Overview

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 your pages aware of which application instance +they are running 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.

Application Instances and Subsites

As you will recall from the packages tutorial, the Request @@ -34,8 +34,8 @@ 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 repeat this description here, assuming that you -have mounted an instance of Notes at the URL /notes as we did in the packages-example:

Using Forms

The forms API is pretty simple: You use calls in the @@ -208,9 +208,9 @@ ad_returnredirect "." } -

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 +

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 all of that code in every set of pages that uses forms.

@@ -222,7 +222,7 @@ 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 home page, and set up the permissions so +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.

This is a good example of the leverage available in the OpenACS 5.9.0 system. The code that we have written for Notes is not at all @@ -240,10 +240,10 @@ structure web services in very flexible ways.

We saw how to use this mechanism in the Notes application and how it makes it possible to easily turn Notes into an application that 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 way, to create forms based pages with minimal duplication of -code.

($‌Id: subsites.xml,v 1.9 2014/10/27 16:39:30 -victorg Exp $)
+private notes database.

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: subsites.html,v 1.48.2.10 2016/06/21 +07:44:36 gustafn Exp $)