libs-gsweb/Examples/WebBookStore1
Dave Wetzel 39c130d0f5 * GSWExtensions/GSWPageRestorationErrorPage.gswc/GSWPageRestorationErrorPage.gswd
* GSWExtensions/GSWSessionCreationErrorPage.gswc/GSWSessionCreationErrorPage.gswd
* GSWExtensions/GNUmakefile
* GSWExtensions/GSWSessionRestorationErrorPage.gswc/GSWSessionRestorationErrorPage.gswd
* GSWExtensions/GSWExceptionPage.gswc/GSWExceptionPage.gswd
use exclamation.png. exclamation.svg is not displayed inline in mozilla 
due to a bug in mozilla.
* GSWExtensions/WebServerResources/exclamation.png
* GSWExtensions/WebServerResources/exclamation.svg
new file
* GSWExtensions/GSWSessionRestorationErrorPage.gswc/GSWSessionRestorationErrorPage.html
* GSWExtensions/GSWExceptionPage.gswc/GSWExceptionPage.html
better web design
* GSWeb/GSWApplication.m
-path
get path from _resourceManager
_resetCache
do not call _clearCache, maybe we should trash the _componentDefinitionCache?
_finishInitializingSession:
make empty, still seems to work
+_applicationClass
don not use _applicationGSWBundle
* GSWeb/GSWResourceManager.h
* GSWeb/GSWResourceManager.m
major redesign with WO 4.5 docs in mind.
* GSWeb/GSWImageButton.m
refactor resourceManager code
* GSWeb/GSWeb.h
remove GSWBundle class
* Testing/DynamicElements
added Image test.



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@30806 72102866-910b-0410-8b05-ffd578937521
2010-06-22 05:02:29 +00:00
..
BookStore.eomodeld * GSWDatabase/WODisplayGroup.m 2010-06-10 03:08:52 +00:00
Main.wo * GSWeb.framework/GNUmakefile 2010-06-10 09:37:23 +00:00
WebServerResources * Examples/WebBookStore1: New example. 2004-11-08 13:14:12 +00:00
Application.h * GSWDatabase/WODisplayGroup.m 2010-06-10 03:08:52 +00:00
Application.m * Examples/WebBookStore1: New example. 2004-11-08 13:14:12 +00:00
DirectAction.h * GSWDatabase/WODisplayGroup.m 2010-06-10 03:08:52 +00:00
DirectAction.m * GSWDatabase/WODisplayGroup.m 2010-06-10 03:08:52 +00:00
GNUmakefile * GSWExtensions/GSWPageRestorationErrorPage.gswc/GSWPageRestorationErrorPage.gswd 2010-06-22 05:02:29 +00:00
Main.h * GSWDatabase/WODisplayGroup.m 2010-06-10 03:08:52 +00:00
Main.m * GSWDatabase/WODisplayGroup.m 2010-06-10 03:08:52 +00:00
README * GSWDatabase/WODisplayGroup.m 2010-06-10 03:08:52 +00:00
Session.h * GSWDatabase/WODisplayGroup.m 2010-06-10 03:08:52 +00:00
Session.m * Examples/WebBookStore1: New example. 2004-11-08 13:14:12 +00:00
WebBookStore1_main.m * GSWDatabase/WODisplayGroup.m 2010-06-10 03:08:52 +00:00

This is how you can get started.

Create the database:

createdb BookStore

psql BookStore

copy/paste this stuff in:

CREATE TABLE BSAUTHOR (FNAME varchar(30), LNAME varchar(30), PID integer NOT NULL);
CREATE TABLE BSBOOK (FK_AUTHOR integer, PID integer NOT NULL, TITLE varchar(30));
CREATE TABLE BSCUSTOMER (FNAME varchar(30), LNAME varchar(30), PID integer NOT NULL);
CREATE TABLE BSORDER (FK_CUSTOMER integer, PID integer NOT NULL);
CREATE TABLE BSORDERPOS (FK_ORDER integer, PID integer NOT NULL);
CREATE SEQUENCE BSAUTHOR_SEQ;
CREATE SEQUENCE BSBOOK_SEQ;
CREATE SEQUENCE BSCUSTOMER_SEQ;
CREATE SEQUENCE BSORDER_SEQ;
CREATE SEQUENCE BSORDERPOS_SEQ;
ALTER TABLE BSAUTHOR ADD PRIMARY KEY (PID);
ALTER TABLE BSBOOK ADD PRIMARY KEY (PID);
ALTER TABLE BSCUSTOMER ADD PRIMARY KEY (PID);
ALTER TABLE BSORDER ADD PRIMARY KEY (PID);
ALTER TABLE BSORDERPOS ADD PRIMARY KEY (PID);
ALTER TABLE BSBOOK ADD CONSTRAINT BSBOOK_author_FK FOREIGN KEY (FK_AUTHOR) REFERENCES BSAUTHOR (PID) DEFERRABLE INITIALLY DEFERRED;
ALTER TABLE BSORDER ADD CONSTRAINT BSORDER_customer_FK FOREIGN KEY (FK_CUSTOMER) REFERENCES BSCUSTOMER (PID) DEFERRABLE INITIALLY DEFERRED;

%----------------------

check what we created:

BookStore=# \d
             List of relations
 Schema |      Name      |   Type   | Owner 
--------+----------------+----------+-------
 public | bsauthor       | table    | dave
 public | bsauthor_seq   | sequence | dave
 public | bsbook         | table    | dave
 public | bsbook_seq     | sequence | dave
 public | bscustomer     | table    | dave
 public | bscustomer_seq | sequence | dave
 public | bsorder        | table    | dave
 public | bsorder_seq    | sequence | dave
 public | bsorderpos     | table    | dave
 public | bsorderpos_seq | sequence | dave
(10 rows)

check .../pgsql/data/pg_hba.conf
The machine running your program should be able to access your database.
This works for me:

host    all         all         172.16.112.1/32          password
(you might have to change the IP)

if needed make pgsql load the new config.

adjust the connection dictionary in BookStore.eomodeld/index.eomodeld

Especially these fields. You can use any text editor or the EOModelEditor.

	databaseServer = hostname;
	password = pw;
	userName = dave;