Before creating your site, it is advised to read the documentation:Before beginning.
The XTEND entity is the XTEND-specific data structure -such as field lists- that represents a functional object of a web site (for example, product, user, address, header or order line...)
The data handled by the XTEND server are provided exclusively by the interface (web services X3) call. There are two ways of creating these data or entities:
An entity is always the result of a mapping with the data structure send by the X3 web service, that is:
These entities are created via an interface call, such as an action via a button or an anchor.
So as to optimize response times and the web service server's work, you can:
All entities generated through a mapping with a Action type interface are stored in the memory and are available during the user session time.
In case of an action on an object (such as the validation of an X3 order), the created entities usually represent a sub-group of the X3 order.
These entities (header and order line) are stored in the memory so as to be:
In case of user login action, the L4G sub-program validates the login information and usually returns a data structure that contains the user account information.
These data can be displayed or used as action setups (sales representative code, site code for the order) or token blocks designed to manage the pages display.
These entities are created via an interface call, such as an access interface, by a token block inserted in a HTML page. These entities can be considered as simple entries returned via an SQL request.
All entities generated through a mapping with a Action type interface are stored in the memory and are available during the HTML page construction.
The data of these entities can be used as action setups or as selection criteria in the block.
In this case, the value is kept in the data context linked to the HTML page (and not in the user session context).
This context is stored in the HTML page itself (specific tag span) and manipulated by the JavaScript functions in the XTEND library.
This principle ensures that the pages function correctly with the 'Return (Back)' and 'Reload' (F5) keys.
For example:
In the case of a products catalogue, the product code -generated by a request on the X3 table, is maintained according to this principle. This way, it can be used as:
This entity is created at the beginning of the session. It can access all the data of the user session.
Setting up an entity consists in:
The fields usually have been created before via the fields Creation Help function of the Tools menu of the interface.
The menu Tools\Entry help provides help in associating field with the entity.
This type is specific and corresponds to the XTEND server's internal entities.
ASSESSION: contains the user session data.
AHTMLFORM: represents the contents of the HTML form of the current HTTP request.
AHTTPCOOKIE: represents the contents of the cookies of the current HTTP request.
An action type entity is created via a user action (mapping of the web service call result)
Action type entities are not attached to any interface because they can potentially be created by several interfaces.
For example:
An SOH order entity can be created via the Create/Modify/Delete actions.
These three action will refer to the same entity in their mapping.
1. Indentify the entities during the project specification phase,
2. Create web services and interfaces without necessary developing the associated code,
3. 2. Generate the fields via the 'Tools' menu of the interface,
4. Create entities and associate the fields.
There is no Action type entities automatic creation tool available from the interface.
When creating an action entity, the XTEND engine creates a field 'AID' for each entity that contains a unique identifier.
This field can be used in Scripting server mode via the removeData and getData methods of the IXtdJsActEntity entity.
Entity created by calling up a 'Data access' type entity that is the equivalent of an SQL request on the base.
"Fields" tableis used to declare the entity fields and to generate the mapping between the XTEND field code (Code column) and the sub-program setup or the X3 field object (Interface setting column).
The same name is usually used except if there is conflict with a different type field.
The publication group of the 'Data access' interface that contains the request fields is set as 'RES'.
1.Generate the interface from an X3 table or an object's left list,
2. 2. Generate the fields via the 'Tools' menu of the interface,
3. Create entities and associate the fields.
There is no 'Data access' entities automatic creation tool available from the interface in the current version.
Fields
The following fields are present on this tab :
| Entity code |
| Current Web site |
| [object Object] |
Close
Fields
The following fields are present on this tab :
Characteristics
|
|
| Interface code |
|   |
|   |
Grid Fields
| XTEND field code: the same name as 'Interface parameter' is usually used except if there is conflict with a different type field. |
| Mapping between the XTEND field code and the parameter name in the interface. It is the sub-programm parameter code (sub-programm web service) or X3 object field code (X3 object web service) The same name (XTEND/X3) is usually used execpt if there is conflict with a different type field. |
| The Publication group code of the 'Data access' interface that contains the request fields of the request (set as 'RES'). |
Grid Fields (selection)
| Key field code. Entity's indentifying fields list. An entity is identified by a dynamic key and N fixed keys:
|
|   |
| Fixed key value. Entity's indentifying fields list. An entity is identified by a dynamic key and N fixed keys.
|
Close
Action icon
By default, the following reports are associated with this function :
PRTSCR : Screen print
This can be changed using a different setup.
This button is used to copy an entity. |
See Getting started documentation of the function.
This function creates entities from an interface's setups.
1. Open the Entity function,
2. Create a new Entity,
3. Select the interface type,
4. For the 'Access table' type, select the interface that will be attached to the entity,
5. Activate the menu 'Tools/Entry help'.
After the selection of the interface, the list of parameters grouped by publication group is displayed:
Column | Description |
Interface setups | Interface setup code. |
Group | Publication group (sub-program) or block code (object) |
Title | Field title for X3 Objects |
Field Token | XTEND field token code. |
Title | XTEND field title |
Creation process:
It is advised to create all XTEND field previously via the utility function "Field creation".
If the field does not exist, the 'Field token' cannot be accessed via F12 key to create it.
Validation with a data coherency control on the XTEND dictionary.