Application Tailoring

The folowing discusses how to tailor the application appearance and contents with minimal or no programming. Refer to sample app code and java docs for more extensive customization such as custom forms.

We strongly reccommend that you consider adjusting passwords.

 

Load Business Objects

The sql in db_init.sql installs only the default business objects with and object id (oid) of 0. You will need to load the specific data for your application.

Object manager

You can manually load objects using the corresponding object manager.

  • Click admin link in the header.
  • Click on the details link for the desired object.
  • Edit the values
  • Press the insert button. This will generate a new object with the given values.
  • Repeat as needed

SQL inserts

Use your data base console client with insert statements. The create.sql has insert statements for default objects. There are also insert statements in the AppName.sql file in the stage directory. In general you will want to set oid field to null to have the database generate an oid.

Batch loads

Your database may provide a batch load utility.

For MySql, you can use the LOAD DATA statement to load tab delineated data from a spread sheet. The following would load a tab delineated lines from the file games.txt into the table wEvent.


	 use lacrosse;
	 
	 load data local infile 'games.txt'
	 	into table wEvent
	 	ignore 1 lines
	 	(oid, what, xwhen, location, name);

 

Appearance

Cascading Style Sheets are used to determine the basic appearance. common.header.jsp inserts a style sheet called base.css. You can edit base.css or link it to one of you choosing.

Several appearances are available in the downloads. Check my site for more skins. Note that these use images in the image directory.

The following describes the styles the managers use.

styleDescription
BODYGeneral text on pages
.headertop level nav bar.
.header_topBottom row of the top bar
.footerBottom bar with copyright
.errError or warning statement
.eformWidgets in edit forms
.epaneTable background for Nav and option forms.
.epanexDetail bar for nav and option forms.
.btnButtons in forms
.pheadFirst level headings.
.phead2Second level headings
.tcapTable captions
.thdTable heading
.evnEven rows in tables
.oddOdd rows in tables
.chdrCalendar headings
.cdatCalendar Dates
.ctblOverall table format for calendars
.cdomCaldendar day of month
.cnilEmpty cell of a calendar
 

Data Schema

The stage directory contains the source for using the zcFac code factory to generate business objects automatically. The basic steps are as follows.

  1. Edit the object definitions in App-Name.txt
  2. Update/create relevant include files
  3. Run bin/mstage. This will create SQL, help files, and java code. The script will copy the java to the src directory.
  4. Use the generated SQL to paste updated create.sql, admin.jsp, ed_main.jsp, and vuq_main.jsp as needed.

Refer to the documentation for zcFac for details.

 

Drop Downs

The Object managers use entries in the vCode table for the contents of drop downs for enumerated fields. These are loaded at when the application starts. The steps are

  1. Change values in the data base. For quick changes you can change/add the values using the code object manager. For more extensive changes you can change the values in db_init.sql and execute the sql.
  2. Reload the table. Either use force reload using the admin page or restart the application.
 

Security

The default templates come with a basic security manager that defines the following roles.

rolelogin/passwordprivileges
guestRead business objects
useruser/okRead business objects
editoreditor/editorEdit values in business objects
adminadmin/adminCreate and delete objects
supersuper/SUPERAnything

Simple changes such as new passwords or names can be made by editing the java code in src/xapp/app/myAppUserMgrBasic.java. You must then rebuild and redeploy the application.

To disable security, set _usrMgr=null the constructor in src/xapp/app/App.java.

For more robust security, consider using container based security.

 

Localization

Version 1.2 localization support requires programming.

 

eden logo Copyright 2004. Lester Pieniazek. All rights reserved Worldwide.