Database Applet - Flex

Home| Download| Support

Demo 1

 

Database Applet is an Adobe Flex application that runs inside a web page. Database Applet requires that requires Flash Player 9 or higher.

Installation

1 Download and unzip dbapplet_flex.zip. Below we will call the location of the unzipped files the Install Directory.  Open the index.html in the install directory in a web browser
2. Create an empty folder for your project. We will call this the project folder.
3. From the install directory copy DBApplet.swf to the project folder
4. Prepare your data in a CSV (Comma delimited) format and save it to the project folder in a file named data.csv. Software like Microsoft Excel will allow you to "Save as" in CSV format The default name is data.csv.
5. Create a file named dbapplet.properties in the project folder. This file is a configuration file for the applet. The details on how to configure the applet are described below. Use a simple text editor like Notepad to create dbapplet.properties.
6. Create a html file that contains the applet tag below. You can cut and paste the tag below into your html file.

If you want automatic detection of Flash Player include the AC_OETags.js in the project folder and look at the source in the demo.html to see how to setup your html page to automatically detect and install the Flash Player

7. You should now have four files in the project folder you created, DBApplet.swf, dbapplet.properties, data.csv and your html file. Upload these files to your web site and open the html page in a web browser. You should see the application and the data loading correctly. Before you test the application you typically want to add a minimum of configuration instructions in the dbapplet.properties such as column names and data types. Add one property per line in dbapplet.properties. A property has a name and a value separated by a space. The properties are listed below. All properties are optional

Properties in the dbapplet.properties file

Property Description

headerInFile

If this is set to true the applet will use the first line in the data.csv file as column headers.

column

You can add a column property per column in the data file. The column property is followed by arguments such as name and type e.g. name=Price; type=number  The application will use the name as column header and type to format and sort the column. In addition to name and type arguments the column can have href and baseref arguments.

dataFile

data.cvs is the default data file. You can specify another name with the dataFile property.

delimiter

Comma is the default delimiter. You can specify other delimiters. The delimiter property be one of the following: COMMA, SPACE, TAB, POUND or SEMICOLON.

form

Link to a server side script that . E.g.


form name=Submit;action=http://www.nktsoft.com/php/upload.php

A button with the name Submit will be added to the toolbar. When the used clicks the submit button the rows with check marks selected will be packed into a comma separated string and posted to the script defined in the action. The script can return an URL that Database Applet will open in a browser window. This feature enables Database Applet to function as a shopping chart with a checkout script defined with the form property. The form could also function as a report gateway.


Column type Description

text

Default type. Columns will sort as text

number

Number values

boolean

data that are either true or false.

date

Date values.

link

Data in link columns are clickable. When the user clicks on link type the applet will try to construct a link and show the link in a browser window. You can specify a baseRef such that the link will be baseRef + column value

 

column name=Accession;type=link;baseRef=http://www.uniprot.org/entry/