Before creating a site, it is recommended to read the following documentation:Before starting.
This function is used to define XTEND site field Tokens
A field can be used as:
These are the possible fiel stypes: text, integer, decimal, currency, date.
These are fields used as tokens in tags such as <img> or <a> in order to generate URLs which grant access to resources such as images or files (text, pdf, word, for instance).
An image access field is used in <img> HTML tags.
This field is created by mapping (in an action or an 'data access') with a web services parameter that contains:
Mapping with a BLOB X3 parameter
The server performs the following processing for the mapping:
For instance:
The following URL is generated during the call process of a 'Data access' web service in order to read a table that contains a BLOB field.
<img src="http://host:port/xtend/x3rsrc/X3SOLUTION/X3FOLDER/XTENDSITE/FRA/ITEMPCT30-112.gif">
The name of the resource used to find the data stored in memory is made of:
In this example, the ITMREF field is a key field for the ITEM entity.
The obtained URL is the one of an product (ITEM entity) from the BLOB parameter (PCT) which key (ITMREF key field) is 30-112.
The extension is given:
The parameters 'Root directory' and 'Relative path' are not taken into account in this type of mapping.
Only the Extension parameter is taken into account.
Mapping with a Char or Clob parameter
When the XTEND server has to create a 'Image access' field from a text web service parameter, it assumes that the text contains the name of the resource.
The server then generates an URL to this resource by taking into account the 'Root directory' parameter, 'Relative path' and Extension in order to recalculate the access path.
XTEND directories
There are four root directories to store XTEND files. Resources (files, images) in these directories can be accessed from the browser via images or attachments tokens.
Design HTML and X_FILES can be placed under the X3 server (by default) or the Web Services server.
X_FILEAPP and X_TEND are always placed under the X3 server.
The 'attachment access' works as the 'Image access' type but with completely different resources (gif, jpg, pdf, word, excel files, for instance).
'Attachment access' tokens are usually used in HTML tags <a></a> to give the possibility to open them by clicking on the sensitive field.
<a src="http://host:port/xtend/data/remote/SOL/FLDR/X_TEND/X_HTML/SITE/FRA/FA.pdf">get Pdf</a>
As for the 'Image access' type, XTEND carries out the mapping between the X3 parameter and the Xtend field according to the X3 parameter.
Mapping with a BLOB X3 parameter
The server stores the binary data in memory and calculates the URL the same ways as the 'Image access' token.
Mapping with a Char or CLOB parameter
The server assumes that the field contains the name of the resource and calculates the URL the same was as the "Image access' token.
A field of of local menu type contains a value of integer type.
The flash field is used to insert X3 flash components in HTML pages via the tag: <object>.
The flash component uses the "Ajax" XTEND request to communicate with the X3 server.
The request call the sub-program SUBAPSMON/MONITEUR with the parameters given by the flash component.
In order to ensure the functioning of flash components with XTEND, the subprogram SUBAPSMON/MONITEUR has to:
Check if the SUBAPSMON/MONITEUR process is published as web service with the publication name AXTDFLASH.
If the subprogram is not published:
The subprogram SUBAPSMON/MONITEUR uses the X3 GUSER variable, that must be correctly set.
In Web service mode, the X3 global variable GUSER contains the X3 User code set as a setup at the moment of the Web service call.
XTEND values the X3 User code depending on whether the User is logged in or not:
If the AXTDFLASH interface does not exist: create the 'Subprogram action' record and AXTDFLASH as publication name.
If the flash component displays the data from another X3 solution:
See technical note TN-12701 from Adobe on the signification of parameters.
<div>
<object adx="MYFLASHFIELD" width="400" height="300">
<!--Paramètres du tag object -->
<param name="quality" value="high">
<param name="scale" value="noscale">
<param name="salign" value="lt">
<param name="bgcolor" value="#FF0000">
</object>
</div>
The adx token accepts the HTML xcache parameter (<object adx="MYFLASHFIELD:xcache">) if the user wants to stock the xml response of the web service in browser memory.
The dynamic link associated to the flash field is used to re-direct the click in the detail contextual menu of the flash component to an XTEND page.
The link parameters are those given by the flash component:
Code | Description |
AFLASHX3FUNC | X3 function code |
AFLASHX3OBJ | X3 object code |
AFLASHX3KEY1 | Key no. 1 code |
AFLASHX3KEY2 | Key no.2 code |
AFLASHX3KEY3 | Key no.3 code |
The block that displays the detail selects the entity in the AFLASHX3KEY1, AFLASHX3KEY2, AFLASHX3KEY2 field (or fields) of the AHTMLFORM block.
Use the following syntax in order to display the value of the field token without using an html tag.
The following syntax is also used in order to valuate JavaScript variables.
</body>
<script>
Initialization of a dictionary variable
var myGlobal=<!adx="MyField"><!adx="MyField">;
</script>
<form>
<!adx="MyField">xxxx<!adx="MyField"><br>
is equivalent to
<p adx="MyField">xxxx</p>
<form>
</body>
The use of a field token in these HTML tags replaces the content between <tag> and </tag> according to the value of this field.
Insertion a token adx retains the existing attributes.
<div adx="MyField"></div>
<td adx="MyFieldDate:xempty=20090101&xfomat=Dz:DD[ ]MMMMMMMMMM[ ]YYYY></td>
<b adx="MyField"></b>
Code | Parameter | Effect |
xformat | X3 format | Formats the value with the format defined by the parameter |
x3format | None | Format of the X3 format value |
xempty | Added value | If the token value is empty, valuates the content with the value defined by the parameter. |
xnotempty | Displayed value | Adds the value passed as parameter to the value of the token; |
The select tag is sued to enter a value between N. Its behavior depends on the token type.
If the attribute 'name' is not entered, XTEND generates this attribute with the token's name.
Local menu token or XTEND value list:
Note: an 'XTEND value list' field is a text field with a list of values entered.
Example 1:
SELECTMENULOC points to menu 7803 and its value is 4:
<select adx="SELECTMENULOC" class="smallTxt">
<option value="">Aucun</option>
</select>
HTML code generated:
<select name="SELECTMENULOC"class="smallTxt">
<option selectedvalue="">None</option>
<option value="1">process ID</option>
...
<option selected="selected" value="4">connection date</option>
...
<option value="13">Phys IO</option></select>Standard token
Example 2:
<select adx="SELECTMENULOC:xonchange=ADLKPOSTPAGE" class="smallTxt">
<option value="">Aucun</option>
</select>
HTML code generated:
<select name="SELECTMENULOC"class="smallTxt"onchange="xtdDoDlk(this,'ADLKPOSTPAGE',null,null,null,0,null,event,true,'',false,null,false);">XTEND selects the option corresponding to the value of the field.
In the following example 'Germany' is selected if the value of MYTOKENFIELD is DE:
<select name="MYTOKENFIELD">
<option value="">None</option>
<option value="AT">Austria</option>
<option selected="selected" value="DE">Germany</option>
<option value="ES">Denmark</option>
</select>
The select tag accepts the following parameters:
<select adx="MYFIELDMAIN:xonchange=MYDYNLINK&xfill=MYFIELDFILL&xrc">
</select>
Code | Parameter | Effect |
xonchange | Dynamic link | Call of the dynamic link on event on Change |
xfill | Local menu field | Fills the select tag with the local menu values |
xrc | None | Recalls the last value selected by the user during the new display of the page if the action has returned an error |
The input tag is used to enter a value.
The field token updates the default value upon loading the page (value attribute) with the field value.
If the attribute 'name' is not entered, XTEND generates this attribute with the token's name.
<input type="text" SIZE="100" adx="MAICOD:xrc">
Code | Parameter | Effect |
xcrit | None | Saves the value and restores the last value automatically. |
xrc | None | Recalls the last value selected by the user during the new display of the page if the action has returned an error |
The textarea tag is used to enter a comment.
<textarea cols="100" rows="5" adx="CMT:xrc">Comment...</textarea>
Idem tag <input>
Fields with list of values or local menu fields can be used as description in HTML pages.
The user can also use text fields without any list of value as descriptions by entering the first value.
The use of a description token instead of text in the HTML page can be used by the webmaster in order to modify descriptions in X3 without modifying them in the HTML.
Descriptions can also be used to manage multi-language in a single HTML page.
Using a local menu or a value list is used to associate several values with the same field. This way, there can be fewer tokens and the management of description is made easier.
The selection of the value in the token is performed via the 'xcaption' HTML parameter.
Defining the field type as description indicates to the XTEND server that the value is static; this optimizes the processing of the HTML page generation.
<span adx="LIBMENULOCAL:xcaption=1" style="color:#FF0099"></span><br>
<span adx="LIBMENULOCAL:xcaption=2" style="color:#FF0099"></span><br>
<span adx="LIBMENUXTD:xcaption=DOC" style="color:#FF0099"></span><br>
<span adx="LIBMENUXTD:xcaption=NEW" style="color:#FF0099"></span><br>
If the ORDSTA field is associated to local menu 1 (Yes/No). Its value is equal to 2
<td align="right" adx="ORDSTA_DESC">XXX</td>
HTML code generated:
<td align="right">Yes</td>
The following syntax is used to valuate the attribute myAttribute with the value of the field token:
<div adx="MyField:xattr=monAttribut"></div>
Example if the value of Myfield is 'MyBeautifullClass'
<div adx="MyField:xattr=class"><div> Generates <div class="MyBeautifullClass"><div>
For the id's, it is possible to add a suffix
<div adx="MyField:xattr=id&xnotempty=article"><div> Generates <div id="PUZ001article"><div>
Special field ALINESTYLE contains the class of even and uneven lines defined in the block's 'Style by line' parameter.
The following code is used to alternate the css class for even and uneven lines.
<table>
<!adx="MonBloc">
<tr adx="aLineStyle:xattr=Class"></tr>
<!adx="MonBloc">
</table>
Generates
<table>
<tr Class="ClasseLignePaire">...</tr>
<tr Class="ClasseLigneImpaire">...</tr>
<tr Class="ClasseLignePaire">...</tr>
</table>
In order to develop complex user interfaces, the user needs to address the DOM HTML elements by their identifier (ID attribute).
XTEND suggests a syntax in order to generate the ID attribute which is particularly useful in blocks.
Used to generate AAUTOID_X IDs.
X is the index of the current line if the tag is placed in an XTEN block.
AAUTOID takes into account multiple AAUTOID_X_Y_Z nested blocks.
The user can also use the HTML parameter if the user has already used a field token to valorize the HTML tag content.
For example:
<table>
<!adx="MonBloc">
<tr adx="AUTOID">
<td adx="ITMREF&xautoid"></td>
</tr>
<!adx="MonBloc">
</table>
Generates
<table>
<tr id="AAUTOID_1">
<td id="ITMREF_1">PUZOO1</td>
</tr>
<tr id="AAUTOID_2">
<td id="ITMREF_2">PUZOO2</td>
</tr>
</table>
The following grid displays the list of field tokens calculated by XTEND:
Code | Type | Description |
ABLKELMTIDX | Integer | Bloc - Index of an element in a block (O->ABLKNBELMTS-1) |
ABLKELMTRANK | Integer | Block - Rank of an element in a block (O->ABLKNBELMTS-1) |
ABLKLINEIDX | Integer | Block - Index of line in a block (O->ABLKNBELMTS-1) |
ABLKLINERANK | Integer | Block - Rank of line in a block (O->ABLKNBLINES) |
ABLKNBELMTS | Integer | Block - Total number of elements (recordings) of a block request |
ABLKNBLINES | Integer | Block - Number of lines in a block |
ABLKSELECTEDLINE | Integer | Block - Rank of the selected line of a block via action ABLKSELECT |
APAGENB | Integer | Block - Number of pages in a block |
APAGENUM | Integer | Block - Rank of a block current page |
APAGEPOS | Integer | Block - APAGEPOS/APAGENUM |
LINESTYLE | Text | Block - Css class of a block line (block parameter) |
AUSERCODE | Text | Context - Current XTEND user code |
AUSERLANG | Text | Context - User language for the HTML |
AUSERPROFILE | Text | Context - User profile if it is signed and if profile management is activated |
AX3SOL | Text | Context - Current X3 solution code |
AX3FOLDER | Text | Context - Current X3 folder code |
AXTENDSITE | Text | Context - Current XTEND site |
APAGEALIAS | Text | Context - Current web page code |
ATODAY | Date | Context - Server date |
AID | Text | Miscellaneous - Unique identifier of an action entity (create by the program) |
APWD | Text | Miscellaneous - Password Also used as parameter and entry field for the login action |
AWEBMASTERMAIL | Text | Miscellaneous - Access to email fields of the current site record |
AMSGUSER | Text | Miscellaneous - User error message |
AMSGERR | Text | Miscellaneous - Error message used only in the error page |
AMODSTAMP | Text | Miscellaneous - TimeStamp of an X3 object |
AAUTOID | Text | Miscellaneous - Generates an ID attribute in the HTML tag |
AJSON | Text | Miscellaneous - Internal use |
AFLASHX3FUNC | Text | Flash - X3 object code |
AFLASHX3OBJ | Text | Flash - X3 function code |
AFLASHX3KEY1 | Text | Flash - Key no. 1 code |
AFLASHX3KEY2 | Text | Flash - Key no. 2 code |
AFLASHX3KEY3 | Text | Flash - Key no. 3 code |
Fields
The following fields are present on this tab :
| Field token code. |
| Current Web site |
|   |
| Special field token type. This element has no priority. It is directly managed by the X3WEB server. |
Close
Fields
The following fields are present on this tab :
Field type
| Field type: Text, Integer, Decimal, Currency, Date, Image access, attachment acces, Local menu, Flash. See the description of field types. |
| Identifier of X3 local menu local that give the list of values for this field and description associated with the value (index). This field can be entered if the field type is "Local menu". |
|
List of values
| Used to associate an XTEND value list for this field. The field is the equivalent of a local menu but with a value list defined by the user via the Value list function. For instance, it can be associated with a value list from an X3 miscellaneous table. The value list also takes into account the tree diagram structures and is used to associate a hierarchy category an a field. This field can be entered if the field type is "text". |
Use
|
|
Close
Fields
The following fields are present on this tab :
Flash
| (Flash components) Code of the XTEND interface to call in order to establish the communication between the flash component and X3. The request call the sub-program SUBAPSMON/MONITEUR with the parameters given by the flash component. In order to ensure the functioning of flash components with XTEND, the subprogram SUBAPSMON/MONITEUR has to:
|
| (Flash components) Select "Yes" to display graph titles. |
|
|
| This is the Flash component. Somme flash component can be used to open an X3 function via a user click. The X3 object key becomes a parameter. This is used to display the content of the X3 object via a block token. |
| (Flash components) Size of the web service (clob) parameter that contains XML data for the flash component inserted in the HTML page. By default: 10. |
Images & attachments
|
|
| Used to overload the extension of the file during the creation of the URL in order to access the attachment or the image. |
| Used to force the extension of the file during the creation of the URL in order to access the attachment or the image. |
Grid Formats
| An HTML project is always associated with a language. The user language code is specified in the URL via the LANG (&LANG=ENG) parameter. If this parameter is not displayed, XTEND will chose the configurationxtend.server.gensetup.deflang. parameter. The action ASESSSWITCHLANG is used to switch the language. |
| Default site format. |
| Used to overload the format for this field. This grid lists all the display formats by language. |
Close
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 a field token. |
This function can be accessed via the tools menu of the setup records
This function is used to create the field tokens from:
Column | Description |
Parameter | Code of the table field or web service parameter associated with an interface |
Description | Field description |
Field Token | Code of field token to create. By default, the field code is equal to the parameter code. |
Present | Selected if this field is already present in the dictionary |
Type | Field type (XTEND) |
Menu | Menu identifier for the type Local Menu |
Dimension | Maximum number of setup or field values |
Generation | For fields of dimension superior to 1, indicates if it is necessary to generate an index (FIELDNAME + INDEX). |
Index | Field index for name calculation |
It is necessary to validates the fields after generation so that the XTEND server takes them into account.
The validation generates a new XML dictionary of XTEND parameters.
The new dictionary is automatically taken into account on reload/F5 of the HTML page in the browser provided the option of the setup record of the site'Technique\Verify updates\Web dictionary' is selected.
If it is not selected, it is necessary to force the reloading of the dictionary using the following url:
'http://hostname:port/xtend/svc/SolutionX3/DossierX3/SiteXtend/admin/reposit/reload'
Validation with a data coherency control on the XTEND dictionary.