Table of contents



Official Content

All objects generated by Patterns are created with default parts, meaning that every part (form, rules, events, variables) of every object is generated by default. This is represented by the following icons:

Default parts - pattern v18

If you change some part of the object, the icon will change as well:

Default parts - pattern v18- section modified.

The implementation based on default parts provides dynamism between the Transaction and the Pattern.

This means that when you change a property in the pattern definition, add a new filter in the instance, or make a change in the Transaction, all objects generated by Patterns will automatically react to the change without the need to reapply the pattern.

For example, the Work With Patterns implementation creates a set of empty objects with specific default templates set in each object. It creates a "WW<Transaction>" Web Panel with a default template that reads the Transaction structure and creates a grid.

Suppose you have a Customer Transaction with the following attributes:

Customer
{
    CustomerId
    CustomerName
    CustomerAddress
}

When you apply the Work With for Web pattern to this Transaction, you will obtain the following WWCustomer Web Panel:

WWCustomer Web Layout

Every time you add an attribute to the Transaction structure, it will also be added in the Transaction's instance and in the Work With Web Panel without the need to apply the pattern again. You only need to open the Work With Web Panel to see all the new attributes in the grid.

In the example, if you add a CustomerEmail attribute in the structure of the Customer Transaction:

Customer
{
    CustomerId
    CustomerName
    CustomerAddress
    CustomerEmail
}

When you save the Transaction, the attribute will be automatically added in the Transaction's instance and in the Work With Web Panel. When you open the objects, you can see the new attribute:

New instance in pattern WWCustomer v18

Patterns v18 - New attribute added in WWCustomer

The dynamism between the Transaction and Pattern remains for all the default parts of the objects.
If you modify the Web Layout of a WW (it does not remain as default) and add a new attribute to the Transaction, the attribute will be automatically added in the Transaction's instance but not in the Work With Web Panel grid.

If you want to have default parts again you can select:

1) Edit (in the Main Menu) > Apply Default. Restores the default values of the part (Rules, Events, Conditions, etc.) where you have opened the object.

2) Edit (in the Main Menu) > Apply Default (All parts). Returns all the parts that have been modified to default.

 

Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant