Home > Development, VB .Net > Events For Non-Query Forms

Events For Non-Query Forms

January 3rd, 2010 Leave a comment Go to comments

For Syteline programmer, when doing the form personalization, it is important to understand the various event sequence for Syteline Forms, so you can know where to put your customized logic in. The following list outlines the sequences of events during form execution for non-query forms.

1. Form initialization

StdFormPredisplay is always the first event to fire. At this point, the components are all created, and the caches, if any, exist and are initialized, but have not yet been loaded with data.

Depending on the initial command, the events generated vary:

Refresh (after the refresh is performed):

StdFormLoadBoundValues

StdFormLoadDerivedValues

StdObjectRefreshCompleted

New (after the new is performed)

StdFormLoadBoundValues

StdFormLoadDerivedValues

StdObjectNewCompleted

Filter (by query):

StdFormLoadBoundValues

StdFormLoadDerivedValues

Meanwhile, the filter form is launched; nothing further occurs until the user finishes with the filter form.

FilterInPlace

The form enter filter-in-place mode; the normal events are generated once the user cancels or executes the filter-in-place.

Default (initialize with auto-insert new if new is enabled)

StdFormLoadBoundValues

StdFormLoadDerivedValues

StdObjectNewCompleted (only if new is enabled and the auto-insert new took place)

Event custom (as defined by the developer)

2. New, including auto-insert new

StdObjectNew

StdFormGetBoundValues

StdFormPerformValidations

StdFormValidationsCompleted

(at this point, the new object is actually inserted into the cache, and becomes the current object)

StdFormLoadBoundValues

StdFormLoadDerivedValues

StdObjectNewCompleted

3. Delete

Due to navigating away from unmodified auto-insert row

StdFormLoadBoundValues

StdFormLoadDerivedValues

StdObjectDeleteCompleted

Marking existing record deleted

StdObjectDelete

StdFormGetBoundValues

StdObjectDeleteCompleted

Deleting new record

StdObjectDelete

StdFormGetBoundValues

StdFormLoadBoundValues

StdFormLoadDerivedValues

StdObjectDeleteCompleted

4. Navigation (substitute “Previous”, “First”, or “Last” for Next for those cases):

StdObjectNext

StdFormGetBoundValues

StdFormPerformValidations

StdFormValidationsCompleted

StdFormLoadBoundValues

StdObjectNextCompleted

5. Refresh

StdObjectRefresh

StdFormGetBoundValues

StdFormLoadBoundValues

StdObjectRefreshCompleted

6. RefreshCurrent

StdObjectRefreshCurrent

StdFormGetBoundValues

StdFormLoadBoundValues

StdFormLoadDerivedValues

StdObjectRefreshCurrentCompleted

7. Filter by query

StdFormFilter

variety of events from query form

StdFormCalledFormReturned

(Query form)StdFormClose

If query form returns Ok

StdObjectRefresh

StdFormGetBoundValues

StdFormLoadBoundValues

StdFormLoadDerivedValues

StdObjectRefreshCompleted

8. Filter in place

Ending with Execute:

StdFormFilterInPlaceBegin

StdFormGetBoundValues

StdFormFilterInPlaceExecute

StdFormGetBoundValues

StdFormLoadBoundValues

StdFormLoadDerivedValues

StdObjectRefreshCompleted

Ending with Cancel:

StdFormFilterInPlaceBegin

StdFormGetBoundValues

StdFormFilterInPlaceCancel

StdFormGetBoundValues

StdFormLoadBoundValues

StdFormLoadDerivedValues

9. Form close

StdFormClose

10. Focus change from one component to another, whether by keyboard or mouse:

If there is a lose focus event specified for the component losing focus, and if the previously current component’s data is modified, then the following occurs for the previously current component:

If the component has the validate immediately attribute:

Move the value to the data source if variable- or standard-object bound, but without refreshing dependents of data source.

Run validators; if this succeeds, then the component modified flag is turned off.

Notify dependents of component to refresh themselves.

Place the value to the data source again (for variable- or standard-object-bound components), this time refreshing dependents of data source.

If there was no validation error, and data changed event specified, generate the data changed event.

If there is a gain focus event specified for the component receiving the focus, the gain focus event is generated.

11. Data modification to a component:

If the modification is “immediate” (selection from a drop-down, selection change in a list box, or clicking a check box or radio button):

Component is marked modified.

If the component is standard-object-bound, then the current object is marked modified.

If the component has the validate immediately attribute:

Move the value to the data source if variable- or standard-object-bound, but without refreshing dependents of data source.

Run validators; if this succeeds, then the component modified flag if turned off.

Notify dependents of component to refresh themselves.

Place the value to the data source again (for variable- or standard-object-bound components), this time refreshing dependents of data source.

If there was no validation error, and data changed event specified, generate the data changed event.

Otherwise: no events are generated, but the following flags are adjusted:

Component is marked modified.

If the component is standard-object-bound, then the current object is marked modified.

Categories: Development, VB .Net Tags: , ,
  1. D Ward
    July 27th, 2010 at 08:17 | #1

    What about the events for adding or modifying records?

  2. Sefa
    June 30th, 2015 at 14:18 | #2

    Hi, How do I set focus on a specific control programmatically?

  1. No trackbacks yet.
You must be logged in to post a comment.