Creating a Custom Java Viewer Template
How Designer Creates a Web Site
- As the user goes through the various panels in Designer, parameters are set for the web site. Additionally, the path for the directory is set.
- After the user has defined what will be in the web site, Designer creates the site's directory.
- Designer copies to this directory files archived in javacustom.jar (found in Manager/Designer/templates directory).
- Designer modifies frame.htm with title defined by user in Designer session.
- Designer writes defaul.axl and default.js using parameters set by user in Designer session.
Create a Web Site with Designer
- Select Java Custom Viewer.
- Select all tools
- Select defaults for all options.
- Create web site.
Modify the Web Site to New Look and/or Functions
- Make appropriate changes to web pages.
- Location and size of frames on page
- Colors
- Tool bar
- New or modified functions
- Must maintain frame names and file references.
- Modified toolbar.htm should work the same as the original.
- Display of tool buttons are dependent on values of
associated parameters
Convert the Web Site into Template
- Modify frame.htm.
- Set the value of variable theTitle to "###TITLE###"
- Designer will look for this value and change it to
the user-defined title
- Delete files that Designer will write out.
- Delete default.axl
- Delete default.js
- Designer will copy all other files without modification.
Create New Jar File for Designer
- Jar utility necessary.
- Provided with Java Compiler
- Bundled with JDK
- Create new jar in web site directory.
- Go to site directory
- Syntax: jar -cvf myjavacustom.jar *.*
- All files and subdirectories in site directory will be archived into jar file
- On NT/Windows enter in Command Prompt
- Alternative is WinZip® version 7 or newer
- Set File name with .jar extension
- Navigate to site directory
- In Add Dialog:
- Under Folders - check Include subfolders - uncheck Save full path info
- Click Add with wildcards button
- Rename original javacustom.jar to javacustom_original.jar.
- Original jar found in Manager/Designer/templates directory
- Rename your new jar file to javacustom.jar.
- Copy your new jar to Manager/Designer/templates directory
Test New Template
- Create a new web site in Designer.
- Select Java Custom Viewer
- Select desired options
- Browse to new web site.
- Site will have "new" look