Create NeXTensio List Wizard

In order to quickly retrieve and display data from a table as a list with advanced capabilities, you can use the Create NeXTensio List Wizard. What this list offers above a standard dynamic table, is the possibility to filter and order the content, as well as automatically generated links to the corresponding NeXTensio form, allowing you to add a new record, update or delete an existing one much more easier. Ordering the list can be done after any of the fields that are displayed, simply by clicking on the column title. An arrow, pointing either up or down indicates the sort manner: ascending or descending.

The Create NeXTensio List Wizard is accessible from two locations:

 

This wizard will create several elements for you (for a complete list, check out below, at the end of the topic):

Before using the Create NeXTensio List Wizard, you should have a correctly configured testing site, as it will be required for the database connection setup step.

The wizard contains 4 steps, each of them addressing some settings:

  1. In the first step define the data that will be displayed.
  2. In the second step define which fields are to be displayed in the list's column.
  3. In the third step define the filter for each column.
  4. In the fourth step set some specific list properties.
Note: You can only create one NeXTensio list per page.

Step 1 - Select a table to work with

To set the dialog box options for the first step of the wizard, follow the instructions below:

  1. In the Get data from drop-down menu select one of the 2 possibilities:
    · Table - if you want to retrieve data from a database table.
    · Recordset - if you want to retrieve data from a recordset.
    Depending on your choice, the interface will display different fields.
  2. If you selected Recordset in the first drop-down menu, configure the following interface field:



    · In the Recordset name drop-down menu select one of the recordsets defined in your page. If you don't have a recordset yet, you can use the Add Recordset button and create one now.

    Note:
    Say your recordset is retrieving data from more than one table and that you set the primary key column as being from table A. Make sure that in the corresponding form, in the first step of the Create NeXTensio Form Wizard, you select table A and the same primary key as the one selected in the list.
    When from the NeXTensio list in browser, you call the NeXTensio form (for either updating or inserting), the form will only display the fields corresponding to table A although the list uses a recordset with more fields.
                             
  3. If you selected Table in the first drop-down menu, configure the following two interface fields:



    · In the Connection drop-down menu select the database connection defined for your site. If you don't have a connection yet, you can use the Define button and create one now.
    · In the Table drop-down menu select the database table retrieved through the selected connection, table that contains the data to display in the list.
  4. In the Primary key column drop-down menu, select the table field which is set to be the primary key. This field contains unique data, and is used by default to pass parameters regarding the record to retrieve between the list and the form.
  5. The Numeric check-box sets the primary key type. It is automatically refreshed when a new field is selected in the Primary key column drop-down menu.
  6. In the Detail page text field, enter the name of the page that displays the details (all fields) for a selected record, as well as allowing the insert and update actions. You can type a file name (file that does not exist) and the wizard will create it for you. Or you can use the Browse button to select the page from your local site folder.
    The default value is form.php and in case it does not exist in your site structure, it will be physically created.
  7. In the Number of records text field specify how many records will be displayed in the list at a time. This translates in how many rows will be in the list. The default value is 10.
  8. The five buttons in the lower part of the interface offer the following functionalities:
    · With the < Back / Next > buttons you can navigate through the wizard's steps.
    · Click Finish when you are done configuring the wizard.
    · Click Cancel to exit without the new settings to be applied.
    · The Help button brings you to this help page.
    These buttons are common to all steps of the NeXTensio List wizard interface.
  9. Click Next to continue with configuring the wizard.

Step 2 - Configure the displayed fields

To set the dialog box options for the second step of the wizard, follow the instructions below:

  1. If in the Get data from drop-down menu of the first wizard step, you selected Recordset, the interface for the second step looks like this:



    Note:
    If you selected Table, the interface for the second step has some extra fields. Details upon these additional fields and the interface itself are presented starting with step 4. But read along for the common interface fields.

  2. In the List columns grid, you can define what table columns will appear in the list. You can add or remove elements by clicking on the Plus (+) and Minus (-) buttons on top of the grid. Also, you can change the order columns are displayed in, by pressing the Up (^) and Down (v) buttons.

  3. For each column there are some properties that can be set. In order to access them, you have to select the list field for which to set the properties from the grid. The available properties are:
    · Header - this will be reflected in the list column title for the corresponding field.
    · Char width - the maximum number of characters displayed is by default 20 (no matter the column type). You can set it as large as you want, but the content of the respective fields cannot spread on multiple rows. So if you set a large length, you will have to use the horizontal page scroll to view all the information listed.

  4. If in the Get data from drop-down menu of the first wizard step, you selected Table, the interface looks like this:


     

  5. Another property that can be set for each field (if you selected Table in the first step of the wizard) lays in the Get value from radio group. Select one of the radio buttons:
    · Current table - the value will be retrieved from the current table (the one that contains the respective column). The three drop-down menus in the lower part of the interface will be disabled.
    · Look-up table - by choosing this button, the value of the selected list column will be retrieved from a related database table. If you choose to use filters in the next wizard step, then the list columns that retrieve their values from look-up tables have the Display as property automatically set on Menu (but you can change it if you want to). In this step, the following three interface fields will be enabled. Read about their configuration below.

  6. In the Database table drop-down menu select the table that contains the values you want to retrieve.

  7. In the Label column drop-down menu select the column that stores the content you want to be displayed in the list.

  8. In the Value column drop-down menu select the column that stores the value of the selected list field.

  9. Click Next to continue with configuring the wizard.

Step 3 - Define the filter

To set the dialog box options for the third step of the wizard, follow the instructions below:

 

  1. In the Use filter drop-down menu select whether or not you want to use filters in the NeXTensio list. If you choose No, the two drop-down menus under the grid will become disabled and no filter will be used in the list.

  2. In the List columns grid, there are enumerated the table columns that appear in the list. You can set filter properties for each one of them.

  3. If you chose to set filters for the list columns, in the Display as drop-down menu select one of the four possibilities of displaying the filter:
    · Text field - you must enter the text to filter the list column by.
    · Menu - the filtering options are displayed in a drop-down menu, allowing users to select only certain values.
    · Checkbox - this option is suitable only for the columns with two values: 1/0, -1/0, or y/n. In browser, if this filter is unchecked, all the rows are listed. If checked, only some rows are listed, namely the ones that have a certain value (1, -1, y) in the respective column.
    · None - select this option if you don't want a filter to be displayed for the current column in the grid.

    Note:
    when selecting a filter to be displayed as a menu (after in step 1 you had chosen to get data from a Table, and in step 2 to get values from a Look-up table), a recordset will be automatically created (named Recordset1 if there isn't any other recordset with this name. If there is, it will be named Recordset2 etc). From this recordset, the menu will retrieve the values it displays.
    If in step 2 you selected to get values from the Current table and you want to display the filter as a menu, under the Max chars text box there will be two buttons that you can use to associate values to the menu filter: Menu Properties and Add Recordset. Add the recordset first.
     

  4. In the Field type drop-down menu select one of the available options. It shows the way filter form fields are submitted. The available values depend on the element chosen in the Display as field.

  5. The Max chars text box is only enabled for filters displayed as text fields. Enter the maximum number of characters accepted in the filter.

  6. Click Next to continue with configuring the wizard.

Step 4 - NeXTensio List Properties

To set the dialog box options for the fourth step of the wizard, follow the instructions below:

 

  1. In the Default order drop-down menu on the left select the column by which the list will be ordered. In the drop-down menu on the right select the manner in which the ordering is to be made: Ascending or Descending.
  2. In the Move up/down column drop-down menu leave the default None option if you are not using an ordering column. This will leave the settings for the previous two drop-down menus enabled.
    By selecting a table column (that should store the records order), the drop-down menus above (Default order) will be disabled. The selected column must store numeric values and must have the unique attribute (there cannot be two identical values).
    Corresponding to the Move up/down column, the list will display in browser 2 buttons on each row, namely the up and down arrows. It will not display the values kept in the database (even if this table column was listed in the List columns grid on step 2).
    By moving rows up and down in the NeXTensio list, the values stored in this table column will be modified / switched between them (after saving the changes).

    Note 1:
    For technical details about selecting the Move up/down column when creating a NeXTensio list, as well as a NeXTensio form, please see the following topic: Move up/down does not work for newly inserted records.

    Note 2:
    If you selected a Move up/down column in your list and later on you want to remove it, you can do this by right-clicking on that column (in Design View in Dreamweaver) and then selecting Table -> Delete Column. You cannot remove this column using one of the server behaviors.
  3. The Current skin used in your site (in all the pages included, not only the current one) has its name displayed in bold text. The Change skin button offers the possibility of choosing another skin out of the available ones (aqua, kollection, arktic, formal) or None, if you don't want to use any skin.



    You can preview the chosen skin in the image provided along with the selected skin. For more details, read CSS Skins.
  4. In the Duplicate buttons drop-down menu select whether or not you want the list buttons to be displayed both in the list's footer and header (the Yes option), or only in the list's footer (the No option).
  5. In the Duplicate navigation drop-down menu select if the navigation elements will be displayed both in the footer and header (the Yes option), or only in the list header (the No option).
  6. In the Table row effects drop-down menu select whether or not you want rows to be highlighted when the mouse is over them.
  7. In the Show links as buttons drop-down menu select whether or not you want the links to be shown as buttons.
  8. In the Has row counter drop-down menu select Yes if you want to display a counter in the list's first column, and No otherwise. It is not related to the columns in the database, but to the list row on which they are displayed.
  9. When you are done configuring the wizard, click the Finish button.
 
The page in Dreamweaver should look like this (if data was retrieved from a table, and not a recordset):


 
As you can see, the list uses some translators in Dreamweaver Design View to display code blocks (e.g. the numbers used in the page header, or the show if conditional region for the filter). Translators are not visible on the final generated page, in the browser. They are just visual aids in Dreamweaver, in order to help you identify the different generated server behaviors and code blocks.

Once applied in a Dreamweaver page, the Create NeXTensio List Wizard will add the following elements in the Server Behaviors tab of the Application panel:

This is how the Server Behaviors tab of the Application panel looks like after applying the wizard (with the settings above) in an empty page:

 

To change any of the list properties at a later time, you can double-click the NeXTensio List Layout server behavior (inserted by the wizard) or apply the Manage NeXTensio List Wizard command, accessed from the Insert bar -> MX Kollection tab.

To learn about the list's behavior in the browser, see NeXTensio List browser behavior.