Iron Speed Designer Help
 

Step 4: Select Pages to Create

Select one or more database tables to create web pages.

Iron Speed Designer generates a variety of web pages for the database tables and views you select.  After creating an initial set of web pages, you can further customize them with the Layout Editor.

Iron Speed Designer can use any number of tables from any number of databases on the same or different database server machines.  There is no practical limit on the number of tables, and their related pages, you can use in your application.

After selecting the specific database tables you wish to use, Iron Speed Designer uses the table schemas in order to create the appropriate SQL queries and database access code.  Similarly, the foreign key information is used in multi-table joins and other similar SQL queries.

Configure Page Type options

Each page type has its own configuration options specific to that page type. You can change these options by clicking the Configure button for the specific page type. See Configure Application Generation Options for details.

Adding additional panels

You may add panels not displayed in the list of panels by creating virtual foreign keys to other tables in your database.  See Adding additional panels for details.

Ownership Requirements for Microsoft SQL Server Databases

In some cases, certain Microsoft SQL Server tables or databases may not be displayed in the column of Tables and Views.  You must be the “owner” (or “dbo” in Microsoft SQL Server parlance) of the databases and database tables in order for Iron Speed Designer to use them.  To enable “dbo”:

Step 1:  Open your SQL Express Explorer and locate your database.

Step 2:  Navigate to the Security folder in your database.  This folder will have the Users listed.

Step 3:  Select the user that you would like to log in as.  

Step 4:  Right-click on this user and select the 'Properties' option.

Step 5:  Click on the 'General' tab in the Property Sheet.  This tab has a field titled ' Default Schema'. Make sure the value entered in this text box is 'dbo'.  Beneath this tab, is another list box that has a list of Role Members.  Make sure 'db_owner' is checked.

Related topics

Creating Edit Record and Show Record pages for database views

Missing Edit Record and Show Record pages

Database, Table, and Field Name Restrictions

File Naming Conventions

Gallery Pages

Many-To-Many child panels

Quick Selector Pages

Mobile Pages

 

File Naming Conventions

Iron Speed Designer uses consistent naming conventions for generated page names. All pages have the database table or view name in the middle or end. In addition, various types of pages are named as follows:

  • Add record page names start with “Add”.

  • Edit record page names start with “Edit”.

  • Report page names start with “Show”, except for GroupBy pages, which start with “GroupBy”.

  • Gallery page names end with “Gallery”.

  • Other page names that show more than one record end with “Table”.

  • Mobile pages end with “Mobile”.

Note: you are free to rename your pages’ filenames. In the Application Explorer, right-click on the page, and select “Rename”.

Many-To-Many child panels

Many-To-Many panels may be used to display child panels when the child table has a many-to-many relationship in the database. There are three tables involved in the relationship: two parents and one child.  A many-to-many panel will be generated in place of the usual child panel when any one of the parents is used to create a page.

These pages allow the generation of Many -To- Many child panels:

  • Edit Record

  • Enhanced with Detail Below

  • Group By

  • Show Record

You can control the generation of the many-to-many panel and generate a one-to-many panel instead using the for “Select which panel to generate” application generation option. This option is availabe for all page types mentioned earlier. Child panel generation depends on both the option setting and the relationship of the child table. If there is no many-to-many relationship for the child table, a one-to-many will be generated.

How many-to-many panels work

Using the SouthWind sample database, the Roles and SalesRep tables both have SalesRepRoles as a child table. When an Edit Roles page is generated, it will show the SalesRep table in a many-to-many panel instead of the usual SalesRepRoles child panel.  Records will be saved in the SalesRepRoles table as usual.

 

The idea is to show both the parent tables of a Many-To-Many child table. The Many-To-Many child table stores the two foreign key values of the parents. Thus the application user can select the check box and click the save button, which will save the two pimary keys as a record in the Many-To-Many table.

The panel has two internal variables which records all the data selected/unselected so the application user does not have to save the record on pagination. These hidden variables will be used when save button is clicked.

A Many-To-Many panel has its own Save button, which can be use to save just this panel.

Selection filters

This panel consists of a static list filter with two initial values: Show All is the default selected option, and Show Included only shows selected record or related record to the parent. In the case of an Edit Roles page, Show Included selection will show all the Sales Reps who belong to this Role.

Use the Property Sheet for the filter to rename the values or set the initial value to Show Included.

Initially the filter type is a dropdown, however you may generate a Checkbox by changing the Many-To-Many Option “Selection filter type”.

 

Gallery Pages

Gallery pages display records repeated both vertically and horizontally.

 

The gallery page is controlled by the “Default number of columns” property in the Application Generation Options and at the page level.  “Default table panel columns” specifies how many columns a record cell can be repeated.

“Default table panel rows” specifies how many rows will be shown on the page. For instance, if one specifies 10 as page size and 3 as number of columns, then total records shown on the page will be 30 (10 * 3) because there will be 3 records in one row (repeating in the horizontal direction) and there will be total of 10 rows (repeating in the vertical direction). To show only 1 record per row, then just change “Number of columns” to 1.

Note: Only the repeater section is repeated; the header section and total sections are not. They still behave the same as other pages. Additionally, insertion of new rows inside the repeater is disabled, because it would result in multiple rows to be repeated. One can still add rows in the header or total sections of the page.

Gallery with Overlaid Text Page

Gallery with Overlaid Text page is similar to the Gallery page in terms of a record being repeated in both directions i.e. horizontal and vertical. However it is supported only for Modern styles. If Classic styles are selected, it will be disabled. If an application is created using Classic styles, then the Gallery with Overlaid Text page cannot be created.

 

Internet Explorer Issue

If the gallery page contains images, during page rendering the browser has to initialize the height and width of the image to place it correctly above the text. In Internet Explorer, in some case it is not able to correctly assume the image height, which can cause the text underneath the image to go behind the image. In order to resolve this issue the height and width of the image can be specified in the Property Sheet. Otherwise, text can be placed above the image.

Customizing Gallery Pages

The default configuration of the gallery page selects only two fields in a single column. It tries to look for the image data type in the database and selects that one and a reasonable second field from the table. Both fields are linked to the show record page or foreign key table page depending on the settings in Application Generation Options.

The header section is not populated with any content by default. If one wants content in the header section, then the content and styles should be present in as many columns as the cell is repeating plus number columns in the Table columns.

In the repeater section, fields are separated by using <br /> tags. If one wants to have more fields in the repeater section, then <br /> tag can be used.

 

In the page total section, one will see that the total text will be generated on the left most cell, then one empty cell with the style, and the next cell will have the total value.

 

 

Quick Selector Pages

A Quick Selector page allows the application user to select values from a table in the application. Iron Speed Designer generates a Quick Selector pages for each table in the application. To regenerate a Quick Selector page, delete it from Application Explorer and then click “Rebuild All”.

 

Mobile Pages

Iron Speed Designer offers many different page types. Of those page types, four are designed for small-screen mobile smartphones; the remainders are for relatively large screen desktop computers. Throughout Iron Speed Designer, the two types of pages and their components are referred to as “Mobile” and “Web”.

Please be aware of these key points:

  • Iron Speed generates pages for use in Mobile phone web browsersMobile and Web pages can coexist in the same application, which provides convenient sharing of data access code and customizations.

  • An application can have two start pages, one for Mobile and one for Web. When a mobile device is detected, the Mobile start page is served. Iron Speed’s testing has emphasized Safari on Apple iOS and Chrome on Google Android. However, Iron Speed may detect other major, mass-produced smartphones. To configure which devices get the Mobile start page, please refer to Setting the Start Page and Error Pages

  • All Modern and Classic page styles support Mobile.

  • Mobile supports multi-lingual applications, including right-to-left.

  • Mobile offers the same support as Web for: C#/VB code generation, role based security, and database servers. The code customization model is the same too.

  • Mobile applications support SharePoint. However, unlike Web pages, Mobile pages do not show the SharePoint server-specific menus and security elements.

Adding Mobile pages to a new or even a migrated application is easy. Simply select a combination of the four mobile pages in the Application Wizard:

The Report Mobile page is a table page that points to the other three record pages:

Note the following differences compared to the larger Web pages:

  • Mobile pages are shown in a special preview format, which approximates the look and proportions of a mobile phone.

  • Filters and Sorts are in a separate pop down window.

  • Buttons are bigger.

  • Pagination is simplified.

  • No more than three or four field values are shown for each record in the table.

  • If a field value is an image, it is shown on the left.

  • Pressing anywhere on a row goes to the corresponding Show Record page.

Because of the limited screen real estate on mobile phones, the mobile menu is shown in a separate page, which is the application’s Mobile start page:

Pressing on any row takes the application user to that table’s Mobile show table page. The settings button permits changing languages on multi-lingual applications.

Note that the Application Explorer tree shows special icons next to Mobile .aspx and .ascx pages. Mobile applications have their own dedicated headers, footers, menus, and, in many cases, components and error pages.

The following limitations are the result of usability requirements, limited mobile screen real estate, or browser-specific behavior:

  • File Upload on Apple iOS requires a 3rd-party native app. File Upload on Google Android may require installation of a memory card.

  • Because smooth panel updates did not work reliably on all firmware versions of our test devices, out-of-the-box Mobile pages do not use smooth panel updates.

  • Mobile pages do not use popup windows. Hence, there are no popup images, Charts drilldowns, or Quick Selector pages.

  • Menus are single-level (no sub menus).

 

Adding additional panels

Optionally add virtual foreign keys that enable Iron Speed Designer to create more robust web pages for your application.

Iron Speed Designer creates a wide range of web pages for each database table and view you select.  The quality and comprehensiveness of your application depends, in part, on your database design.  The more complete your design, the better Iron Speed Designer can do.

The primary and foreign keys definitions in your database are key (pardon the pun) to creating a full suite of web pages.  However, in many cases, you may not be able to explicitly define primary and foreign keys in your database.  Iron Speed Designer provides an alternative that lets you instruct Iron Speed Designer to treat designated fields as ‘virtual primary keys’ and ‘virtual foreign keys’.

Virtual primary keys

As with explicitly declared primary keys, Iron Speed Designer creates Edit and Show Record and Workflow pages using virtual primary keys.  This is especially useful for database views which may not be permitted to have explicit primary keys.  Unfortunately not all databases permit you to explicitly declare primary keys in database views, so declaring a virtual primary key in Iron Speed Designer may be the only way to create certain page types.  Even if the database does permit primary keys for views, the particular views you are using may not have them defined.

Iron Speed Designer suggests potential candidate virtual primary key fields using these criteria:

  • The table does not already have a physical primary key declared in the database itself

  • A database field’s data type is GUID

  • A database field’s data type is a number and the field’s name ends with a common primary key suffix, such as “ID”, “NUM”, “NUMBER”, and “NUMBERS” (case insensitive), e.g., CategoriesID, PhoneNum, and SSNum.

Virtual foreign keys

As with explicitly declared foreign keys, Iron Speed Designer uses virtual foreign key relationships to create master-detail pages.  This is especially useful for database views which may not be permitted to have explicit foreign keys.  Unfortunately not all databases permit you to explicitly declare foreign keys in database views, so declaring a virtual foreign key in Iron Speed Designer may be the only way to create certain page types.  Even if the database does permit foreign keys for views, the particular views you are using may not have them defined.

Iron Speed Designer suggests potential candidate virtual foreign key fields when the database field’s name ends with a common foreign key suffix, such as “ID”, “NUM”, and “NUMBER” (case insensitive), and there is another table whose primary key field or virtual primary key field has same name.  For example:

Categories.SupplierID à Suppliers.SupplierID

Creating Edit Record and Show Record pages for database views

You can easily display and edit records for database views.  In some cases, you may have already created Table Report and Edit Table pages and the icon links to the associated Edit Record and Show Record pages are missing.

To enable editing of database views and, by implication, their underlying table records, two conditions must be met:

  • A Virtual Primary Key must be asserted on the database view in Iron Speed Designer. This enables the application to uniquely identify a specific virtual record comprised of the underlying tables.  The application must be able to uniquely identify a record (physical or virtual) in order to edit it; otherwise the application doesn't know which one to edit.

  • Editing a database view record must not violate any constraints in the underlying database tables.  For example, if the database view omits certain required fields (e.g., not-NULL constraints) in the underlying tables, then the application may attempt to edit (update) underlying tables without having all the required fields.  This will cause the database to throw an exception when the application attempts to update the underlying table records.

Virtual Primary Keys can be added via the Application Wizard’s Keys step and via the Databases menu.

Missing Edit Record and Show Record pages

In some cases, the icon links to Edit Record and Show Record pages will be missing from Table Report and Edit Table pages you create.

The primary reason for this is the underlying database table or view does not have a primary key, which makes it impossible for Iron Speed Designer’s Application Wizard to create pages for editing and displaying specific records.  You can easily remedy this by adding a primary key for the table or view in your database.  If this is not possible, then you can add a Virtual Primary Key (VPK) directly in Iron Speed Designer, a facility that instructs Iron Speed Designer to treat the designated field as if it were a primary key.  After adding either the primary key in the database table or a Virtual Primary Key in Iron Speed Designer, use the Application Wizard to re-create the associated pages.

Non-updatable database views

Iron Speed Designer excludes certain database views as Virtual Primary Key candidates in situations that indicate the database view is not updateable, such as when the view:

  • Contains aggregates such as columns that are calculated using SUM, COUNT, etc.

  • Contains a DISTINCT clause.

  • Includes multiple base tables

  • Created WITH CHECK OPTION

  • Uses UNION ALL

  • Contains TOP clause

Some database views may not be recognized by Iron Speed Designer as not being updateable. In these cases, the Keys step may suggest Virtual Primary Keys.  Selecting these VPK’s may result in a compile-time or run-time error because the view is not updateable.