Setting Dialog Properties

Description

A run down on how to set different Dialog properties.

The Dialog Component is obsolete. Use the UX Component instead.
  1. Selecting Layout Options > Style name > '...' button > Select style displays the Select style dialog box. You can preview and select the Cascading Style Sheet that you would like to apply to the grid.

  2. Selecting Layout Options > Style name >'...' button > Edit Style displays the Webform Style Builder. Here you can save a style with a new name, then edit its characteristics to create a new stylesheet that will appear in the Select style dialog box.

Clicking the 'up' button on the Style drop down list displays the Select style dialog box. You can preview and select the Cascading Style Sheet that you would like to apply to the grid. Clicking Edit Style displays the Webform Style Builder. Here you can save a style with a new name, then edit its characteristics to create a new stylesheet that will appear in the Select style dialog box.

 Advanced Properties

  •  Layout Calculation Mode

    Enables alternate processing modes that can enhance performance. The options are:

    tmpl.PreCalcMode as C
    • "Standard"

    • "Precalculate Layout"

 Other Properties

  •  Stylesheet

    Specifies the name of the stylesheet.

    tmpl.style_name as C
  •  Component Name

    Specifies the name of the component.

    tmpl.ComponentName as C

 Client Events

  •  Validate before submit

    This setting allows you to validate data on the form before the form is submitted. This requires Javascript to be enabled on the client browser. Rules for each control are defined in the Validation Rules for each control. Enable client side validation for each control by checking the Client side validation check box on the Controls page.

    tmpl.ValidateBeforeSubmit as L

 Dialog Footer Layout

  •  Freeform layout

    Will there be a freeform layout?

    tmpl.dialogFooterHasFreeformLayout as L
  •  Dialog footer template

    Specifies the buttons and formatting of the dialog footer.

    tmpl.dialogFooterTemplate = <<%html%
    ' code here
    %html%

 Freeform Edit Regions

  •  Above dialog

    HTML to appear above the dialog component.

    tmpl.EditRegion.Dialog.Top = <<%txt%
    ' code here
    %txt%
  •  Below dialog

    HTML to appear below the dialog component.

    tmpl.EditRegion.Dialog.Bottom = <<%txt%
    ' code here
    %txt%
  •  Left of dialog

    HTML to appear to the left of the dialog component.

    tmpl.EditRegion.Dialog.Left = <<%txt%
    ' code here
    %txt%
  •  Right of dialog

    HTML to appear to the right of the dialog component.

    tmpl.EditRegion.Dialog.Right = <<%txt%
    ' code here
    %txt%

 Layout Options

  •  Font size

    Specify if the fonts in the Web Component should be scaled to make the Web Component larger or smaller. Select 'Medium' for no scaling (i.e. the fonts shown will match those defined in the style sheet). The options are:

    tmpl.fontsize as C
    • "Smallest"

    • "Smaller"

    • "Medium"

    • "Larger"

    • "Largest"

  •  Show row labels

    Enables or disables the display of labels next to each control.

    tmpl.show_row_labels as L
  •  Position of field error messages

    Specify whether field validation error messages should be grouped together in the form header, or shown underneath the controls that have errors. The options are:

    tmpl.Position_Field_Error_Messages as C
    • "Form Header"

    • "Next to Control"

  •  Number of "Layout" Columns

    Display the controls of the dialog in more than 1 column.

    tmpl.LayoutColumns as N
  •  Use Free-Form Layout

    Indicate that you want to create a free-form layout.

    tmpl.flagFreeForm as L
  •  Free-Form Layout

    The HTML that defines the free-form layout.

    tmpl.FreeFormHTML as C

 Submit/Reset Buttons

  •  Has Submit button

    Does this dialog have a Submit button?

    tmpl.has_submit_button as L
  •  Submit button label

    Label for the Submit button.

    tmpl.submit_button_label as C
  •  Submit button in-line style

    Specify style attributes that override the settings inherited from the style sheet. Click to display the Style Editor.

    tmpl.Variable_Info
    .submit_button_inlinestyle as C
  •  Has Reset button

    Does this dialog have a Reset button?

    tmpl.has_reset_button as L
  •  Reset button label

    Label for the Reset button.

    tmpl.reset_button_label as C
  •  Reset button in-line style

    Specify style attributes that override the settings inherited from the style sheet. Click to display the Style Editor.

    tmpl.Variable_Info
    .reset_button_inlinestyle as C
  •  Align

    Specifies whether to align buttons at the left or right edge of the dialog.

    tmpl.button_alignment as C

 Server Events

  •  Declarations

    Use the Declarations section to define any User Defined Functions that you want to be available to all Xbasic event code. Click '...' to open the Form Events dialog box.

    tmpl.Declarations = <<%code%
    ' code here
    %code%
  •  Initialize

    The Initialize event fires the first time the form is run. The Initialize event is not fired when the form is run the second and subsequent times or when the form is submitted to itself. Click '...' to open the Form Events dialog box.

    tmpl.Initialize = <<%code%
    ' code here
    %code%
  •  Validate

    The Validate event fires every time the form is submitted. It is the first event that fires when the form is submitted to itself. If the code in the Validate event sets the Has_Error property of any object on the form to .T., Alpha Anywhere re-displays the form so that the user can correct errors, and then re-submit the form. Click '...' to open the Form Events dialog box.

    tmpl.Validate = <<%code%
    ' code here
    %code%
  •  AfterValidate

    The AfterValidate event fires after the Validate event, but only if the Validate event code did not set any control's Has_Error property to .T. Click '...' to open the Form Events dialog box.

    tmpl.AfterValidate = <<%code%
    ' code here
    %code%
  •  Activate

    The Activate event fires every time the form is run. The Activate event fires after the Validate and AfterValidate events. Click '...' to open the Form Events dialog box.

    tmpl.Activate = <<%code%
    ' code here
    %code%
If you are writing your own Xbasic on a .A5W page, then to redirect to another page you use the RESPONSE.REDIRECT() method. However, if you are writing code in a Version 6 dialog event handler (such as AfterValidate ) in a component, you cannot use RESPONSE.REDIRECT(). Instead you must set the currentform.redirectTarget = "target url" property.

Web publishing applications only.

See Also