• No results found

Modify a layout to include the LOV component

In document OTL Timecard Configuration (Page 36-39)

Qualifiers for the LOV component

QUALIFIER_ATTRIBUTE1 - View Object Name

This is the View Usage name of the View Object to be used for rendering the LOV. The View Usage name is simply the name given to the instance of the view object in the application module.

QUALIFIER_ATTRIBUTE3 - LOV AK Region Code

This is the AK Region Code of the LOV region that has been defined for the component. If you are customizing a LOV then you will almost certainly need to create a new AK region for it.

QUALIFIER_ATTRIBUTE4 - LOV AK Region Application ID

This is just the Application ID that the AK Region specified above was created in. QUALIFIER_ATTRIBUTE5 - Display Width

This is the character width of the LOV text field on the page. Note: due to the way that HTML form components are interpreted by browsers--due mainly to the use of

proportional fonts--the width of the field may not be the 'expected' width. QUALIFIER_ATTRIBUTE6 - LOV Criteria

This qualifier is used to set up the criteria used for the LOV. It is a tokenized string consisting of 4 items per criteria, each separated by a pipe symbol '|'.

Note: when a LOV component is rendered by the configurable UI it will actually render two components. One contains the actual ID that is submitted and saved with the

timecard (this component can be referred to by the alias given to the LOV component in the layout definition). This ID component is rendered on the page as a hidden field and the ID value in the LOV should be returned to it.

The other field that is rendered is the actual text field that can be seen on the page. This field contains the 'display' value for the LOV. This field has an implicit alias given to it of the base alias name followed by '-DISPLAY'. This alias should also be populated as a result of the LOV. Bear in mind that if you create other fields on the screen that are dependant on the ID of a field, then you should also take into account the 'display' value to cover the scenario where a user is manually entering values into the LOV text fields (in this scenario the ID fields will not be populated).

QUALIFIER_ATTRIBUTE7 - Result Column Mappings 36

If there are other fields on the screen that you want to be populated as a result of the selection in the LOV then you should specify them here. For example, the System Linkage Function comes back with the Expenditure Type. Note that the in page

population of result fields is handled in qualifier_attribute6 as stated above - this qualifier is used for the case when the LOV functionality is not used on the screen and a value is entered manually. In this scenario, when the page is submitted, the query for the LOV will be executed with the manually entered value and if a unique result is found the 'result' columns will be populated using the attribute in the VO specified by this qualifier. To allow multiple result columns to be specified, this qualifier is a token separated string consisting of 'ALIAS|View Object Attribute Name' pairs.

So for example, if you have a query and wish the component aliased as 'PROJECT' to contain the value from the 'ProjectId' column in the VO, and the component aliased as 'PROJECTCODE' to contain the value from the 'ProjectCode' column in the VO, the qualifier would be:

QUALIFIER_ATTRIBUTE7 = "PROJECT|ProjectId|PROJECTCODE|ProjectCode" QUALIFIER_ATTRIBUTE8 - Displayed Attribute Name

This is the name of the VO Attribute that will be used for the value displayed in the LOV field on the screen.

QUALIFIER_ATTRIBUTE9 - ID Attribute Name

This is the name of the VO Attribute that will be used for the value actually stored for the LOV component (usually a unique ID for the displayed value).

QUALIFIER_ATTRIBUTE10 - View Object Class

This is the VO class (including full package specification). QUALIFIER_ATTRIBUTE11 - Bind Variable #1

This is the value or alias used for the first bind parameter in the VO (not used usually). QUALIFIER_ATTRIBUTE12 - Bind Variable #2

This is the value or alias used for the second bind parameter in the VO (not used usually). QUALIFIER_ATTRIBUTE13 - Bind Variable #3

This is the value or alias used for the third bind parameter in the VO (not used usually). QUALIFIER_ATTRIBUTE14 - Dependent Item List

This qualifier contains the mappings between items in the LOV and aliases in the 37

timecard for the purposes of building the query clause at runtime. There is a third value which is used to specify if this mapping is also to be used when the LOV is built - in most cases this will be set to Y, but may be set to N in cases where the appropriate values are being passed into the LOV code using the criteria.

The value for this qualifier is a double token separated list - for each dependent item there is a tokenized string in the form 'Lov Item Name|Alias|Use in LOV'. If there is more than one dependent item more can be added, separating each one with a hash '#' - i.e. 'Item1|ALIAS1|Y#Item2|ALIAS2|Y'

QUALIFIER_ATTRIBUTE15 - Dependent Item Where Clause

This qualifier is linked to the dependent item list qualifier outlined above. The value for this qualifier is also a token separated string and contains the fragments of SQL to be added to the where clause if a value for the dependent item exists. There should be one entry on this list for each of the dependent items specified in qualifier 14 - each of the entries is separated by a hash sign '#'.

In order to reference the value of the dependent item, you can prefix the LOV item name with two colons. For example 'my_column = ::Item1'.

Note that for LOVs the displayed value is implicitly added to the where clause using UPPER to make it case-insensitive.

So for our example, the component definition is:-

######################################################################## # My Custom Person LOV #

####################################################################### BEGIN HXC_LAYOUT_COMPONENTS "My Custom Layout - Custom Person LOV" OWNER = "CUSTOM" COMPONENT_VALUE = "CUSTOMPERSON" SEQUENCE = "140" COMPONENT_DEFINITION = "LOV" RENDER_TYPE = "WEB" PARENT_COMPONENT =

"My Custom Layout - Day Scope Building blocks for worker timecard matrix" REGION_CODE = "MY_CUSTOM_AK_PROMPT_REGION"

REGION_CODE_APP_SHORT_NAME = "HXC"

ATTRIBUTE_CODE = "MY_CUSTOM_PERSON_PROMPT" ATTRIBUTE_CODE_APP_SHORT_NAME = "HXC"

BEGIN HXC_LAYOUT_COMP_QUALIFIERS "My Custom Layout - Custom Person LOV" OWNER = "CUSTOM" QUALIFIER_ATTRIBUTE_CATEGORY = "LOV" QUALIFIER_ATTRIBUTE1 = "CustomPersonVO" QUALIFIER_ATTRIBUTE2 = "N" QUALIFIER_ATTRIBUTE3 = "MY_CUSTOM_LOV" QUALIFIER_ATTRIBUTE4 = "809"

QUALIFIER_ATTRIBUTE5 = "12" # display width QUALIFIER_ATTRIBUTE6 = "CustomFullName|CUSTOMPERSON- DISPLAY|CRITERIA|N|CustomPersonId|CUSTOMPERSON|RESULT|N|CustomFullName|CUSTOMPERSON- DISPLAY|RESULT|N|CustomBusinessGroupId|BUSINESSGROUP|RESULT|N" QUALIFIER_ATTRIBUTE7 = "BUSINESSGROUP|CustomBusinessGroupId" QUALIFIER_ATTRIBUTE8 = "CustomFullName" QUALIFIER_ATTRIBUTE9 = "CustomPersonId" 38

QUALIFIER_ATTRIBUTE10 = "my.custom.server.CustomPersonVO" QUALIFIER_ATTRIBUTE20 = "N" QUALIFIER_ATTRIBUTE21 = "Y" QUALIFIER_ATTRIBUTE22 = "L" QUALIFIER_ATTRIBUTE25 = "FLEX" QUALIFIER_ATTRIBUTE26 = "MYFLEX" QUALIFIER_ATTRIBUTE27 = "Attribute1" QUALIFIER_ATTRIBUTE28 = "CUSTOMPERSON" END HXC_LAYOUT_COMP_QUALIFIERS END HXC_LAYOUT_COMPONENTS

Note: If you wish to also show the new LOV field on the review and confirmation layouts you will need to modify them to include the component as well. The easiest way to accomplish this is to copy the component definition over from the timecard layout, changing the component name, parent component name and qualifier name. Then you just need to modify the copied definition to make it render as a read only text field--this is done by adding a value of ‘Y’ for qualifier_attribute30:

QUALIFIER_ATTRIBUTE30 = ‘Y’

In document OTL Timecard Configuration (Page 36-39)

Related documents