User Tools

Site Tools


tplcontrolbrowseupdatebuttons.htm
Navigation:  Templates > Guide to all Templates > Control Templates >====== BrowseUpdateButtons control template ====== Previous pageReturn to chapter overviewNext page

The BrowseUpdateButtons template provides three buttons for managing file I/O for a BrowseBox: Insert, Change, and Delete. These three button controls act on the records in a browse box. When pressed, the button retrieves the selected record and invokes the respective database action for that record.

The BrowseUpdateButtons template lets you specify an update procedure (recommended for files with two-way relationships) or edit-in-place updates (recommended for lookup files–files with one-way relationships).

(Jump directly to the Edit-in-Place topics)

The BrowseUpdateButtons template provides the following prompts:

Update Procedure

Type a procedure name or select a procedure name from the drop-down list. If you type a new procedure name, the Application Generator adds the new procedure to the Application Tree.

Procedure Parameters

Allows you to specify parameter names (an optional list of variables separated by commas) for your update procedure, which you can pass to it from the calling browse procedure. You must specify the functionality for the parameters in embedded source code.

Example: (LOC:HideID,GLO:AccessLevel)

Press the “E” button to call the Expression Editor. This dialog is used to help you construct syntactically correct expressions to use in the Procedure Parameters prompt.

Allow Edit via Popup

Check this box to provide right-click popup menus on the Browse list in addition to any command or toolbar buttons.

blk2blue.jpg

Edit-in-Place

Use Edit in place

Check this box to let the end user update the browsed file by typing directly into the BrowseBox list control (like an Excel spreadsheet). This provides a very direct, intuitive spreadsheet style of update. You may configure the Edit in place behavior with the Configure Edit in place button.

NoteBox.jpg

The Detailed Interface of the Browse EIP manager enables a variety of control types to be used with Edit In Place without the need to embed hand code.

In order to invoke the EIP manager, go to Global Properties and select the Classes Tab. Click on the Browser button, and click on the EIP tab control. On the EIP tab use the drop down associated with that entry, select Detailed.

Conditionally use an update Form

Check this box to conditionally allow the use of a full update Form.  This can be useful, for example for adding new records, so that the end-user has a complete Form to input the new data. When this box is checked you will be required to specify a condition that tells your program to call the update Form procedure.

Condition to use Form

Specify the condition that tells your program to call the update Form procedure.

Configure Edit in place

Press this button to open the Configure Edit in place dialog. This dialog provides the following prompts:

General Tab Prompts

Save

The Configure Edit in place dialog offers the Save option for four different keyboard actions. These options determine whether changes to an edited record are saved or abandoned upon the following keyboard actions: TAB key at end of row, ENTER key, up or down arrow key, focus loss (changing focus to another control or window, typically with a mouse-click). Choose from:

Default Save the record as defined in the BrowseClass.Ask method.
Always Always save the record.
Never Never save the record, abandon the changes.
Prompted Ask the end user whether to save or cancel the changes.

Remain editing

The Configure Edit in place dialog offers the Remain editing option for three different keyboard actions. Check these boxes to continue editing upon the following keyboard actions: TAB key at end of row, ENTER key, up or down arrow key. Clear the boxes to stop editing.

Retain column

The Configure Edit in place dialog offers the Retain column option for the up and down arrow keys only. Check this box to continue editing within the same list box column in the new row. Clear to continue editing within the left most editable column in the new row.

Insertion Point

The Configure Edit in place dialog offers the Insertion Point option for initial new record placement in the list. The droplist choices' before, after, and append' indicate where the edit-in-place row will appear in the list when inserting a record. Before and after indicate placement in relation to the highlighted record, and append places the edit-in-place row at bottom of the list.

NoteBox.jpg

This does not change the sort order. After insertion, the list is resorted and the new record appears in the proper position within the sort sequence.

Action on Delete

The Configure Edit in place dialog offers the Action on delete option when a record deletion is attempted during edit-in-place. Select Prompted from the drop list if you wish the user to be prompted with a confirm delete message prior to deletion. Select Never if you do not want to allow record deletions from an edit-in-place. Finally, select Always if you want to allow users to delete records during edit-in-place, and the deletion is automatic (no confirm message).

Field Priming on Insert

Press this button to access the Field Priming dialog window. Field Priming lets you provide a default value for fields in a new record. This value supersedes any initial value specified in the data dictionary. You can select a field and set an initial value in the Field Priming dialog.

Column Specific Tab Prompts

The interface that follows for column specific EIP options will vary according to the Global EIP Configuration option you have set.

By default, the Global EIP Configuration option is set to Original. This option presents you initially with a blank list box. You must specifically Insert each column that will be used for edit-in-place. The ability to override the default class behavior is also available as you Insert each column.

The Detailed Global EIP Configuration automatically populates the Column Specific list box with all columns. Pressing the Properties button allows detailed EIP control that is discussed below.

If the Global EIP Configuration is set to Original, the Column Specific dialog will appear without a General and Class tab control. These tab controls only appear when a Detailed Global EIP Configuration is selected.

In Original EIP mode, press the ellipsis button to select a Field to add to the EIP controls. Check the Allow Edit-In-Place box to allow edit-in-place for the selected control. After selecting a field, the Class Definition group is then enabled.

In both modes, the Column Specific dialog lets you control the class (and object) the procedure uses to edit a specific Browsebox column. You may specify your own or a third party class.

By default, the BrowseUpdateButton template generates code to use the EditEntryClass in the ABC Library. The Global Edit in place (EIP) class must have the EditEntryClass specified as the base class. You can also use the other edit classes or derive your own.

The Application Generator must know about the CLASS you specify–see the Template Overview–ABC Compliant Classes section in the Template Language Reference for more information. See also Classes Tab.

Column Specific Dialog: General Sub Tab Prompts

This tab and its associated prompts are only available when the Global EIP Configuration is set to Detailed.

EIPNew.jpg

Allow Edit-In-Place

Check this box to allow edit-in-place for the selected control.

Type

Select from 13 types of window and dialog controls. Each control and dialog support has specific prompts that are applicable to that specific type.

The type control triggers the appropriate EIP class implementation, and options set the properties necessary for that class object. For more information, see the EditClass and other supporting classes in the ABC Library Reference.

It is also important to know that the DropList and DropCombo type controls used for EIP are manual controls (not control templates), and will need to have their list queues manually defined and populated to ensure their successful use.

The MultiSelect type includes a MultiSelect Options button where the following additional options are available:

Data Source

Choose from Fixed or Queue. This designates if the multiselect list box will be loaded from a hard coded (fixed) set of values, or from a queue that can be dynamically built and modified at runtime.

The Fixed option contains an option to designate an item as auto-selected. Click on the Selected check box to enable this option. This option is ignored if the Auto Serialize Field option is enabled.

Auto Serialize Field

Check this box if you would like the template to auto-populate the target EIP column with selected items in the MultiSelect dialog. If you do not enable this option, you will have to manually process the selected elements using the TakeCompletedProcess embed point. See the ABC Library Reference for more information.

Field Delimiter

Specify the delimiter to use between selected items. This prompt is required if you choose to auto serialize. Enter the delimiter without single quotes. A “space” delimiter cannot be used here.

See Also:     How to Control the Update Buttons of the Browse Box template

tplcontrolbrowseupdatebuttons.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1