The mgiDynamicPopup Tag
Tag Behavior
The mgiDynamicPopup tag dynamically builds a popup menu of
unique values in a database field.
Tag Syntax
The mgiDynamicPopup tag has four required parameters and three
optional parameter. The tag form is:
<mgiDynamicPopup source="Source" databaseFileLocation="File Path"
tableName="Table Name" fieldName="Database Field" name="Name"
initialMenuItem="Item" initialMenuItemValue="Value">
Required Parameters:
- source="Source" where "Source"
is the location of the popup menu items. Currently "database"
is the only valid source.
- databaseFileLocation="File Path" where "File
Path" is the relative path to the database file that contains
the popup menu items. The database name is case-sensitive.
- tableName="Table Name" where "Table
Name" is the name of the database table that contains the
popup menu items. The table name is case-sensitive.
- fieldName="Database Field" where "Database
Field" is the name of the database field whose values will
be displayed in the popup menu. Every unique value from the database
field will be displayed in ascending order (A to Z, smallest
to largest) in the popup menu.
Optional Parameters:
- name="Name" where "Name" is the
name of the popup menu. The default name is "field=FieldName"
where "FieldName" is the name of the database field
specified in the fieldName parameter.
- initialMenuItem="Item" where "Item"
is the first item that will be displayed in the popup menu. The
default is a blank space.
- initialMenuItemValue="Value" where "Value"
is the value of the first item in the popup menu. The default
value is empty.
Example Usage and Output
<mgiDynamicPopup source="database"
databasefilelocation="JobDatabase" tablename="Positions"
fieldname="State" initialmenuitem="-- select item --">
This mgiDynamicPopup tag will display unique States listed
in the Positions table of the JobDatabase. The first item in
the popup menu will be -- select item --.
Suggested Usage
- Searchable Databases
- Form Processing
|