Work With Pattern is one of the best-known and most useful patterns in business applications. It was first popularized by IBM and was rapidly adopted by GeneXus.
It is a User Interface pattern based on 'Object Action Dialogs', where users first select an object from a list to 'work with' it, and then apply an action to it.
In particular, the GeneXus Work With Pattern is embedded in GeneXus so that GeneXus developers can easily apply it from their KBs. All the objects necessary to implement a web application (Work With web panels, View web panels, Prompt web panels, etc.) are obtained by applying this pattern to one or several selected Transactions.
This Pattern will generate the following objects for each selected Transaction:
Work With Web Panel
It's a Web Panel with a grid that lists all the records in a table and includes the following features:
-
Paging
-
Conditional Filters
-
Multiple Orders
-
Control Info for Filter Attributes
-
Standard Actions
-
Export to Excel
-
Save Grid State
Click here to see a Work With Web Panel sample
View Web Panel
It's a Web Panel that shows all the information of a record that has been selected in the grid of a Work With Web Panel. It shows the record's data in a tab, and also shows one tab for each subordinated table, containing a grid with the related information.
Click here to see a View Web Panel sample
Optional Features
-
Context management
-
Object level security
Work With Pattern Nodes
The Pattern Settings define all the parameters that are needed to create an instance of the Work With pattern (for example, what attributes will be used in the Work With Form, etc.). While it is very straightforward, and can be used intuitively, in this section we describe all of its nodes.
Root Node
It has the following attributes (accessed from the Properties window):

Update Transaction property. As we have seen, the Work With pattern creates from one Transaction (or any number of Transactions we want) all the objects needed to obtain a web application. But in order to fully implement the pattern, besides generating new objects the Transactions involved must comply with a number of definitions: they must have the same look and feel as the other objects, they must include a parm rule, etc. These changes can be applied to the Transactions by the pattern itself, so that the developer does not have to do it manually, and to make sure that all the necessary conditions will be complied.
The changes to be made to the Transactions involved are:
-
Applying the Theme to the Transaction form
-
Associating the Header and Footer Web Components to the Transaction Web form
-
Modifying or adding the parm rule, depending on the Pattern configuration
-
Adding the After Transaction event with the code required to call the Transaction Controller
The Update Transaction property offers the following values, so that you can decide what to do:
-
Do not update: If you select this value, the Transaction won't be modified (web form, rules and events are kept).
-
Only rules and events (default value): If you select this value, only rules and events are modified, but not the web form.
-
Apply WW Style: If you select this value, the first time the pattern is applied to the Transaction its behavior will be the same as it would be if you selected the Create Default value. The next time it is selected, the header, footer and buttons in the web form will be changed, but not the Data Area. Rules and events will also be modified.
-
Create default: If you select this value, the web form, rules and events will be modified.
Note that the order of the values available is such that each subsequent one offers the possibility of introducing an additional change in the Transaction.
Navigation Group:
This group has the following properties:

-
AfterInsert
-
AfterUpdate
-
AfterDelete
These properties allow you to set the form you want to go to after making an insertion, an update or a deletion, respectively.
For each of these properties, there is a combo box which offers the following values: <default>,<return to caller>,<go to view>,<go to selection>.
Level Node
The instance file will have one Level node for each Transaction level.
Each of these nodes has the following properties:
-
Name. The default value of this property is the level's base table.
-
Description. Describes the node.
And the following sub-nodes:
DescriptionAttribute
It defines the Transaction's Description Attribute property. Description Attribute can be configured in GeneXus.
Since this attribute will have a link, it can only be an Edit type attribute (that is, it cannot be a Combo or checkbox).
Selection
See Selection Node
View
See View Node
Generated GeneXus Objects
By default this pattern generates the following objects:
Note:
This Pattern features the use of the HistoryManager UserControl in order to use AJAX refresh at the tabbed view of the pattern.
See Also
Setting the Work With Pattern to see what the general settings related to all instances are.
|