This topic details the values that can be taken by custom controls, see Details of controls.
Displaying an attribute value
The displayed value of a control most often depends on the context.
To find out the format of the value, refer to the "Expression" property of a standard control. This gives a pattern for setting the value of custom controls.
Otherwise, use the expressions in the format indicated in the rest of the page.
Detail screen
The value has the form #{formAnimator.bean.<attrName> }.
Examples:
#{formAnimator.bean.PMP} in the article detail form refers to the PMP.
#{formAnimator.bean.purchaseType.description} refers to the label of the purchase type.
#{formAnimator.bean.firstVendor} corresponds to an info zone on the main vendor of the article.
#{formAnimator.bean.computeActCost} refers to the total actual costs of a work order (calculated field, therefore read-only).
See Determine the value of a control.
Display information about a status change
The expression #{<bean> .statusHisto.<CODE_ETAT> ['first'|'last'].<attrName> } refers to an attribute of the first or last history line concerning the status with code <CODE_ETAT>.
Examples:
#{formAnimator.bean.statusHisto.VALIDATED.changedBy.code} in the routing detail form refers to the code of the user who validated the routing.
#{formAnimator.bean.statusHisto.VALIDATED['first'].comment} refers to the comment of the first validation of the routing.
#{formAnimator.bean.statusHisto.VALIDATED['last'].changedDate} refers to the status change date of the last validation of the routing.
The expression #{<bean>.statusHisto[idx].<attrName>} refers to an attribute of the history line with index idx, whatever the status.
Examples:
#{formAnimator.bean.statusHisto[0].comment} refers to the comment of the last status change of the routing.
If neither of the options ['first'] and ['last'] is specified, the last occurrence is taken into account.
Comparing dates
The functions available to compare an attribute with a date are as follows:
- isTodayOrBefore(Object value)
- isYesterdayOrBefore(Object value)
- isTodayOrAfter(Object value)
- isTomorrowOrAfter(Object value)
- isToday(Object value)
- isTodayOrBeforeWithBeanContext(Object value, TemporalBean bean)
- isYesterdayOrBeforeWithBeanContext(Object value, TemporalBean bean)
- isTodayOrAfterWithBeanContext(Object value, TemporalBean bean)
- isTodayWithBeanContext(Object value, TemporalBean bean)
Example:
On an equipment card, you want to display a boolean if the warranty end date is later than sysdate.
The syntax to enter in the displayed field is: #{cs:isTomorrowOrAfter( formAnimator.bean.endGuarantee )}.
Displaying a list item
For lists of type LIST, access to a list item by specifying its position is done using the form #{formAnimator.bean.<attrName> [i].<attrName> }.
Examples:
#{formAnimator.bean.occupations[0].duration} refers to the duration of the first occupation in the work order detail form.
#{formAnimator.bean.purchaseLines[0].item.code} refers to the item code of the first LDA of a purchase request.
#{formAnimator.bean.hierarchicalParents['MAIN'].parent} refers to the parent equipment in the main hierarchy.
#{formAnimator.bean.hierarchicalParents['MAIN'].linkBegin} refers to the date when the equipment was linked to its main parent.
#{formAnimator.bean.hierarchicalParents['LOCATION'].parent.description} refers to the label of the geographical parent of the equipment.
It is possible to display a field that allows you to assign the parent of the equipment when it is created:
Examples:
[MATERIAL,MAINMATERIAL,LOCATIONMATERIAL] for an Equipment.
MAIN,LOCATION,LOCATIONMAIN] for a structure node.
Special case of the detail of a maintenance plan trigger
#{tableAnimator.activeBean.bean.periodicityValue} refers to the periodicity value of the trigger in the detail panel of the Work order plan (detail form).
The field must be added directly in the detail panel.
Special case of the contract
The displayed form corresponds to the selected period.
#{formAnimator.bean.contract.vendor} refers to the vendor of the contract.
Search screen
The value has the form #{formAnimator.searchBean.<attrName> }.
For adding search criteria, see Advanced filter and Adding a search criterion.
Result list or sublist of a detail screen
The value has the form: #{tableAnimator.rowData.<attrName> }.
Example:
#{tableAnimator.rowData.firstVendor} in the article result form displays the main vendor of the article.
Special case of equipment
#{tableAnimator.rowData.hierarchicalParents['LOCATION'].parent} refers to the geographical parent of the equipment.
Special case of macro-planning
#{tableAnimator.rowData.data.actionType} refers to the type of work order.
#{tableAnimator.rowData.data.expLabourCost} refers to the planned labor costs.
Special case of maintenance plan triggers
#{tableAnimator.bean.periodicityValue} refers to the periodicity value of the trigger in the trigger list of the Work order plan.
Characteristics
Access to a characteristic is done using the characteristic code.
Example:
#{formAnimator.getCustomCharactValueByCode('PUISSANCE').objectValue} in the detail form of the Equipment displays the characteristic with code PUISSANCE if it exists, and associates it with the Equipment if it was not already associated.
So that clicking a Link or a Button opens a linked document, set the "action" property to the value OPENDOCACTION,
→ A new property then appears: "Parameter 1".Its value must be the code or the nature of the document to open, a document linked to the element or from the library.
It can be dynamic.Example of parameter 1:
#{formAnimator.bean.item.notice} where "notice" is a specific field containing either the code of the linked document to open or the code of its nature (List of values DOCNATURE).
The "Value" property of the link makes it possible to override the link label with dynamic text.
So that clicking a Link or a Button opens a page in the browser, set the "action" property to the value OPENURLACTION,
→ A new property then appears: "Parameter 1".Its value must be the URL.
The "Target" property, if specified on the link (as free text), is used to indicate that the URL will be opened in a new browser window.Links that have the same target value in a form will all open in the same browser window.
- Action = OPENURLACTION
- Parameter 1 = http://....//
- Target, which for a link is an HTML parameter and can have the following values:
- _blank: opens in a new window,
- _self: opens in the same window,
- The name attribute of an iframe present on the page.
- For a button, the link is always opened in the current window.
- The URL attribute refers to the path of the image illustrating the link or button.
For a library document or a linked document to be displayed in an image, access is done by:
The code is unique, whereas several documents can have the same nature.
For the value to be taken into account, the "Image" property must be empty.
Example:
#{formAnimator.documentURL['CONTRACT_OTIS']} in a link control on the vendor form is a hyperlink to the document "CONTRACT_OTIS".
Example:
#{formAnimator.documentURL['IMAGE']} in an image control on the model form displays the image contained in the document with nature "Photo", if it is defined for the model. (The natures are defined in the List of values DOCNATURE).
Example:
#{formAnimator.documentURL[formAnimator.bean.code]}, if the code of the linked image document is the same as the code of the element itself.
This syntax applies only to linked documents with nature "Photo".
Example:
#{formAnimator.documentURL['IMAGE,this,material,material.item,mainVendor']}, in the article form, if the image is to be searched, in descending order of priority: on the article, on its Equipment, on the model of its Equipment, on the main vendor.
It is possible to add indicators to the form, thereby displaying calculated information on related elements.
For example: The list of Work requests on an Equipment.In the case of an indicator filter, the most suitable is to add a link, but in all cases, it is possible to display the indicator label and value.
Indicator on a related element
It is also possible to display an indicator related to an attribute of the object.
For example, on the work order detail screen, display the indicator returning the list of contract periods of the Equipment of the current work order.
In this case, add a link with the following values:
Refreshing the indicator
For the indicator to be refreshed when the field to which it relates is filled in,
- Select this field,
- Click the refresh icon
,
- Refreshed zones property: Enter the identifier of the component(s) containing the indicator.
Attribute consisting of an array or a list
If a field points to an element of an array or list (rare case), access is done by specifying its position only.
Example:
#{formAnimator.bean.preventiveTriggerPatterns[1].symptom refers to the symptom of the first of the triggers of the Work order plan template.