Index: openacs-4/packages/acs-templating/www/doc/demo/index.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/doc/demo/index.adp,v
diff -u -r1.3.2.2 -r1.3.2.3
--- openacs-4/packages/acs-templating/www/doc/demo/index.adp 25 Aug 2015 18:02:14 -0000 1.3.2.2
+++ openacs-4/packages/acs-templating/www/doc/demo/index.adp 24 May 2016 15:00:49 -0000 1.3.2.3
@@ -285,11 +285,18 @@
A form with Select widgets | View | View | View | View |
-
-Custom validation of a request | View | View | View | Inline Error
-Message |
-
Sitewide Error Page |
Valid
-Request |
+
+
+
+Custom validation of a request |
+View |
+View |
+View |
+Error Page |
+
+Valid Request |
+
+
A form with the Date widget | View | View | View | View |
Editing: several pages in one | View | View | View | View |
Index: openacs-4/packages/acs-templating/www/doc/demo/state.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/doc/demo/state.adp,v
diff -u -r1.4 -r1.4.2.1
--- openacs-4/packages/acs-templating/www/doc/demo/state.adp 16 Jun 2015 08:57:10 -0000 1.4
+++ openacs-4/packages/acs-templating/www/doc/demo/state.adp 24 May 2016 15:00:49 -0000 1.4.2.1
@@ -1,28 +1,10 @@
-
-
-
-
-
-Sample Users by State
+Valid State Abbrev
+
-
- Sorry, could not obtain result for your request:
- @requesterror.state_abbrev@
-
-
-
-
-
+Sample Users by State
-
@state_abbrev@ |
-
-
The @users.last_name@ Family
|
-
-
Index: openacs-4/packages/acs-templating/www/doc/demo/state.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/doc/demo/state.tcl,v
diff -u -r1.1.1.1.30.1 -r1.1.1.1.30.2
--- openacs-4/packages/acs-templating/www/doc/demo/state.tcl 10 Sep 2015 08:22:12 -0000 1.1.1.1.30.1
+++ openacs-4/packages/acs-templating/www/doc/demo/state.tcl 24 May 2016 15:00:49 -0000 1.1.1.1.30.2
@@ -2,36 +2,27 @@
$Id$
} -query {
state_abbrev
-} -properties {}
-
-request create
-
-request set_param state_abbrev -datatype keyword -validate {
- { regexp {CA|HI|NV} $value }
- { Invalid state abbreviation $value. }
+} -properties {} -validate {
+ validate_state_abbreaf -requires state_abbrev {
+ if {$state_abbrev ni {CA HI NV}} {
+ ad_complain "Invalid state abbreviation $state_abbrev."
+ }
+ }
}
-# demonstrate the separate error page
-
-if { [ns_queryexists errorpage] } {
-
- if { [request is_valid] } { return }
-
-} else {
-
- request is_valid self
+set query {
+ select
+ first_name, last_name, state
+ from
+ ad_template_sample_users
+ where
+ state = :state_abbrev
+ order by last_name
}
+
+db_multirow users state_query $query
-set query "select
- first_name, last_name, state
- from
- ad_template_sample_users
- where
- state = :state_abbrev
- order by last_name"
-
-db_multirow users state_query $query
# Local variables:
# mode: tcl
# tcl-indent-level: 4