User:anonymousLog inRegister
Recents:
Work With Pattern

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

Image:Patterns - WW Root node 

It has the following attributes (accessed from the Properties window):

Image:Patterns - General Group Property

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:

Image:Patterns - Navigation Group Property

  • 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>. 

Transaction Node

This node allows you to define: 

  • The Transaction associated with this instance file
  • The master page that will be used
  • The parameters used to call the Transaction. By default, the defined parameters are &Mode, PKAttribute1, ..., PKAttributeN

The position of the &Mode (whether its first or last) can be defined in the Navigation group of the Template node properties window.

Each parameter has the following properties:

  • Domain. When the parameter is a variable, the variable Domain must be defined.
  • Nullvalue. It allows you to define that if an insertion is performed, the parameter must come with a null value. For example, when inserting a Customer whose CustomerId has the autonumber property configured, this property should be True. 

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:

See Also

Setting the Work With Pattern to see what the general settings related to all instances are.




Created: 11/27/07 03:21 PM by prodml Last update: 01/04/10 04:18 PM by prodml
 
Page
Categories
Group
 
Powered by GXwiki 3.0 (generated with GeneXus X Evolution 1 U3)