${ROOT_DIR}/tvc-action/navigate?pageConfig=tvc:pageconfig/Customers.xml
21 March 2016
© Copyright 2003-2019 by TECHNIA AB
All rights reserved.
PROPRIETARY RIGHTS NOTICE: This documentation is proprietary property of TECHNIA AB. In accordance with the terms and conditions of the Software License Agreement between the Customer and TECHNIA AB, the Customer is allowed to print as many copies as necessary of documentation copyrighted by TECHNIA relating to the software being used. This documentation shall be treated as confidential information and should be used only by employees or contractors with the Customer in accordance with the Agreement.
This product includes software developed by the Apache Software Foundation. (http://www.apache.org/).
As of TVC release 6.0, it is possible to define most of the administrative objects and other configuration objects (business objects or other TVC configuration objects) used by TVC in XML. These XML files are kept under a special folder within the web application (see this chapter).
The administrative objects that can be defined in such XML files are: System tables, menus, commands, filters, inquiries, stylesheets (page object), file package download configurations (page object), search forms (page object), XBL configurations (page object), Create/Edit Forms and the configuration objects that can be defined in XML are: Views, Page configuration objects, search configuration objects, report definitions and build structure configuration objects.
The purpose of using XML based definitions is to reduce the implementation time needed to manage the database objects and to simplify modifications of those objects. For example, if you have a toolbar containing an action menu with several commands for a structure browser view – one would normally have to create several menu and command objects using either MQL or business. Also, one would have to maintain MQL/TCL scripts that updated these objects accordingly in the database when modifications are needed. By using the new approach of defining these administrative objects using XML in TVC, one would just have to manage one or a few XML files, depending on how they are separated (a whole menu hierarchy could be defined inside one XML file, but for reuse – one could split parts of the menu to separate files, and also put the commands in separate files), which does not require any database modification.
Ease of deployment is another benefit when using the XML based configuration approach. The modifications to the database are kept to a minimum.
Moreover, the XML strategy allows you to simplify things – for example, if you want to have a label for a command registered in different languages, you would normally have to specify the key for the label on the command itself, and then register the label-property in different properties files where the key is translated for the different languages. The new XML support, allows you to declare the translated value for different locales directly within the XML file.
The following list shows which of the administrative objects that could be represented in XML format.
System Table
Inquiry
Menu
Command
Page Object
Stylesheets [Report Generator]
Search Forms [Structure Browser]
Grid Browser Configurations [Grid Browser]
File Package Download configurations [File Manager]
XBL Configuration [XBOM Manager]
Filter
The following list shows which of the business object types used to configure different TVC Components that can be represented in XML format.
TVC Page Configuration
TVC View
TVC Search Configuration
TVC Build Structure Configuration
Report Definitions:
TVC Expansion Report
TVC Inquiry Report
TVC Advanced Report
TVC Custom Report
TVC JPO Report
Below is a list of additional configuration objects that only can be defined in XML:
Dashboard
Top Panel
Top Panel Forms
When referring to an XML based definition, one has to follow a special naming convention in order for TVC to recognize such a resource.
For example, the command below is referring to a "page configuration" (Used in the structure browser) stored in an XML file:
${ROOT_DIR}/tvc-action/navigate?pageConfig=tvc:pageconfig/Customers.xml
It is also possible to have separate domains for the resources, for example resources belonging to one domain of an application can be kept completely separate from another domain of an application. This is illustrated below:
${ROOT_DIR}/tvc-action/navigate?pageConfig=tvc:pageconfig:customermgmt/Customers.xml
^^^^^^^^^^^^^
In the example above, we are referring to a page configuration definition stored in "Customers.xml" under the domain "customermgmt".
You don’t have to use the domain concept, but it is recommended in the case when you have a large amount of configurations belonging to different functionality around the application. It makes it easier to manage the files. By using a domain, you will also ensure that there won’t be any naming conflicts between different configurations.
The table below illustrates how to correctly write the name of an XML based resource.
Resource Type | Name Prefix |
---|---|
Table |
tvc:table/MyTable.xml |
Table Column |
tvc:tablecolumn/MyColumn.xml |
Inquiry |
tvc:inquiry/MyInquiry.xml |
Menu |
tvc:menu/MyMenu.xml |
Command |
tvc:command/MyCommand.xml |
Filter |
tvc:filter/MyFilter |
File Package Download Config |
tvc:fpd/MyConfig.xml |
XBL Config |
tvc:xblconfig/MyXBLConfig.xml |
Stylesheet |
tvc:stylesheet/MyStylesheet.xslt |
Search Form |
tvc:searchform/MySearchForm.xml |
Create/Edit Form |
tvc:form/MyForm.xml |
Create/Edit Form Field |
tvc:formfield/MyField.xml |
Grid Browser Configuration |
tvc:gridbrowserconfig/MyGridBrowserConfiguration.xml |
TVC Page Configuration |
tvc:pageconfig/MyPageConfiguration.xml |
TVC View |
tvc:view/MyView.xml |
TVC Search Configuration |
tvc:searchconfig/MySearchConfiguration.xml |
TVC Build Structure Configuration |
tvc:buildstructureconfig/MyBuildStructureConfiguration.xml |
TVC Report Definition:
|
tvc:report/MyReport.xml |
When using domains, you have to apply the domain name after the resource type. For example:
tvc:view:mydomain/MyView.xml
It is not recommended to use a domain-name, which is used for to represent a resource type. For example, you should not have a domain called "table", "view", "filter" etc. |
The resource files are stored in the web-application under the "/WEB-INF/tvc" folder.
Once an XML resource is requested, the name of the resource is translated into a path, which points to the actual resource file. The list below shows the path for each resource type.
The translation of name to the actual file is:
/WEB-INF/tvc/${RESOURCETYPE}/${FILENAME}
Below is a table showing some example of the translated paths.
Resource Type | Location |
---|---|
Table |
/WEB-INF/tvc/table |
Table Column |
/WEB-INF/tvc/tablecolumn |
Inquiry |
/WEB-INF/tvc/inquiry |
Menu |
/WEB-INF/tvc/menu |
Command |
/WEB-INF/tvc/command |
Filter |
/WEB-INF/tvc/filter |
Search Form |
/WEB-INF/tvc/searchform |
Create/Edit Form |
/WEB-INF/tvc/form |
Create/Edit Form Field |
/WEB-INF/tvc/formfield |
Grid Browser Configuration |
/WEB-INF/tvc/gridbrowserconfig |
File Package Configuration |
/WEB-INF/tvc/fpd |
XBL Configuration |
/WEB-INF/xblconfig |
TVC Page Configuration |
/WEB-INF/tvc/pageconfig |
TVC View |
/WEB-INF/tvc/view |
TVC Search Configuration |
/WEB-INF/tvc/searchconfig |
TVC Build Structure Configuration |
/WEB-INF/tvc/buildstructureconfig |
When the resource refers to a resource under a specific domain, the name is translated according to the following rules:
/WEB-INF/tvc/${DOMAIN}/${RESOURCETYPE}/${FILENAME}
Below is a table showing some examples of paths translated
Resource Type | Location |
---|---|
Table |
/WEB-INF/tvc/${DOMAIN}/table |
Table Column |
/WEB-INF/tvc/${DOMAIN}/tablecolumn |
Inquiry |
/WEB-INF/tvc/${DOMAIN}/inquiry |
Menu |
/WEB-INF/tvc/${DOMAIN}/menu |
Command |
/WEB-INF/tvc/${DOMAIN}/command |
Filter |
/WEB-INF/tvc/${DOMAIN}/filter |
Search Form |
/WEB-INF/tvc/${DOMAIN}/searchform |
Create/Edit Form |
/WEB-INF/tvc/${DOMAIN}/form |
Create/Edit Form Field |
/WEB-INF/tvc/${DOMAIN}/formfield |
Grid Browser Configuration |
/WEB-INF/tvc/${DOMAIN}/gridbrowserconfig |
File Package Configuration |
/WEB-INF/tvc/${DOMAIN}/fpd |
XBL Configuration |
/WEB-INF/${DOMAIN}/xblconfig |
TVC Page Configuration |
/WEB-INF/tvc/${DOMAIN}/pageconfig |
TVC View |
/WEB-INF/tvc/${DOMAIN}/view |
TVC Search Configuration |
/WEB-INF/tvc/${DOMAIN}/searchconfig |
TVC Build Structure Configuration |
/WEB-INF/tvc/${DOMAIN}/buildstructureconfig |
When a resource file is changed, for example a table is updated; TVC will (if TVC is started in development mode) reload the resource automatically, this is done by checking the modified timestamp on the file.
If TVC is started in PRODUCTION mode, you will need to clear the TVC cache in order to reflect the new changes. There is no need to restart the application server.
A resource can also be stored within the classpath (i.e. in a JAR file). To refer to such a resource, for example under "/com/acme/resources/MyTable.xml", you have to write the name as:
tvc:table//com/acme/resources/MyTable.xml
If you want to override the definition of the resource found in the classpath, you can then create a new file called MyTable.xml under the following directory:
/WEB-INF/tvc/table/com/acme/resources/MyTable.xml
The internal resource handler in TVC will first look into such a directory and check if the resource exists there before retrieving it from the classpath.
A resource could be overridden by putting a file with the same name and folder structure under the tvc-ext folder instead of tvc in WEB-INF:
WEB-INF/tvc-ext
This might be useful when changing an xml resource shipped with TVC. The example below will change the display name of the collection table:
WEB-INF/tvc-ext/sb/collection/table/CollectionTable.xml
As of TVC 2012.1.0 the resource loader has been slightly changed / optimized. The resource loader will when scanning the directories below /WEB-INF/tvc not include directories that has a name starting with a dot character. E.g. directories like ".svn", ".cvs" etc are omitted. This can be disabled if needed through the init-parameter in web.xml as shown below.
<init-param>
<param-name>tvc.core.resources.omitDirectoriesWithLeadingDot</param-name>
<param-value>FALSE</param-value>
</init-param>
Also, the resource loader will only accept files having the suffix ".xml", ".xslt" and ".xsl" (case in-sensitive). This can be changed through the init-parameter in web.xml as shown below.
<init-param>
<param-name>tvc.core.resources.validResourceFileExtensions</param-name>
<param-value>xml,xslt,xsl</param-value>
</init-param>
The chapters below will for each configuration object show how to format it in XML. The format is illustrated by showing example, and in case when needed – the elements are described more detailed separately.
The first example below shows how to register a menu containing three commands. The first two commands are referring to XML resources, while the last command is referring to a command in the database.
<Menu>
<Command ref="tvc:command/CreatePurchaseOrder.xml"/>
<Command ref="tvc:command/Separator.xml"/>
<Command ref="DeleteSelected"/>
</Menu>
A menu definition can be made more advanced, for example:
<?xml version="1.0" encoding="ISO-8859-1"?>
<Menu>
<Menu>
<Label>Actions</Label>
<Label locale="de">Tätigkeiten</Label>
<Command>
<Label>Create Item</Label>
<Href>${ROOT_DIR}/example/CreateItem.jsp</Href>
<TargetLocation>popup</TargetLocation>
<WindowHeight>400</WindowHeight>
<WindowWidth>400</WindowWidth>
<SubmitForm>TRUE</SubmitForm>
<RowSelectType>Single</RowSelectType>
</Command>
<Command ref="tvc:command/AddItem.xml"/>
<Command ref="tvc:command/Separator.xml"/>
<Command ref="tvc:command/Promote.xml"/>
<Command ref="tvc:command/Demote.xml"/>
<Command ref="DeleteSelected"/>
</Menu>
<Menu ref="AnotherMenu"/>
<Menu ref="tvc:menu/AThirdMenu.xml"/>
</Menu>
In the example above, the menu definition defines the whole menu hierarchy and has several commands (both inline and referring commands). The referred commands are stored both as XML resources and in the database. The top level menu also includes sub-menus defined both in the database, and as an XML resource.
An XML command can be defined as the example below:
<Command>
<Label>Add Item</Label>
<Href>${ROOT_DIR}/example/AddItem.jsp</Href>
<OpenPopup>TRUE</OpenPopup>
<WindowHeight>400</WindowHeight>
<WindowWidth>400</WindowWidth>
<SubmitForm>TRUE</SubmitForm>
<RowSelectType>Single</RowSelectType>
</Command>
As of TVC 2009.1, the href can be specified in an alternative way. Very often, the length of the href becomes very long due to the number of parameters present. This makes it difficult to read. An enhanced variant of defining the href is available, see example below:
<Command>
<URL href="/example/AddItem.jsp"
submit="true"
target="tableHiddenFrame"
submitOID="true">
<Param name="firstParam" value="the value"/>
<Param name="secondParam" value="the value"/>
<Param name="thirdParam" value="the value"/>
<Param name="fourthParam" value="the value"/>
</URL>
...
</Command>
The attributes "submit", "target" and "submitOID" are just short hands for defining the corresponding settings.
If the URL is pointing to a TVC action, this could be written as:
<URL action="myAction">
If the URL is referring to a Java Script, this could be written as:
<URL js="myFunction();">
The table below shows the sub elements that are supported under a menu and or command element.
Element Name | Description | Example |
---|---|---|
AccessExpression |
Defines the Access Expression Setting |
<AccessExpression>current != 'Released'</AccessExpression> |
AccessMask |
Defines the Access Mask setting |
<AccessMask>read,modify</AccessMask> |
AccessProgram |
Defines the Access Program Setting |
<AccessProgram name="A Program" function="checkAccess"/> |
Alt |
Defines the alternate message. The alternate message can be defined in multiple lanuages. |
<Alt>Add</Alt> <Alt locale="sv">Lägg till</Label> <Alt localt="de">Addieren</Label> |
CardID |
Defines the Card ID setting |
<CardID>The Id</CardID> |
CardLoadScript |
Defines the Card Load Script setting |
<CardLoadScript>onLoad()</CardLoadScript> |
CardReloadable |
Defines the Card Reloadable setting |
<CardReloadable>true</CardReloadable> |
CardTitle |
Defines the Card Title setting. The card title can be defined in multiple languages. |
<CardTitle>Example</CardTitle> <CardTitle locale="de">Beispiel</CardTitle> |
CardWidth |
Defines the Card Width setting |
<CardWidth>300</CardWidth> |
ConfirmMessage |
Defines the confirm message. The confirm message can be defined in multiple languages. |
<ConfirmMessage>Are you sure?</ConfirmMessage> <ConfirmMessage locale="de"> Sind Sie sicher</ConfirmMessage> |
Label |
Defines the label for the menu or command. The label can be defined in multiple languages. |
<Label>Add</Label> <Label locale="sv">Lägg till</Label> <Label locale="de">Addieren</Label> |
OpenPopup |
Short hand for setting target location to popup. |
<OpenPopup>True</OpenPopup> |
ProgressMessage |
Defines the progress message. The progress message can be defined in multiple languages. |
<ProgressMessage>Please wait…</ProgressMessage> <ProgressMessage locale="de"> Bitte Wartezeit…</ProgressMessage> |
RowSelectType |
Defines the row selection behavior for the command. |
<RowSelectType>None</RowSelectType> <RowSelectType>Single</RowSelectType> <RowSelectType>Multiple</RowSelectType> |
Separator |
Defines if the command should act as a separator or not. (Not applicable for menus). |
|
Setting |
Adds a custom setting |
<Setting name="Name of Setting" value="The value"/> |
ShowProgress |
Defines whether or not to show the progress message. |
<ShowProgress>true</ShowProgress> |
SubmitForm |
Defines if the form should be submitted |
<SubmitForm>true</SubmitForm> |
TargetLocation |
Sets the target location. Value is a string. |
<TargetLocation>popup</TargetLocation> |
URL |
Simplifies defining the HREF |
<URL href="…" submit="true"> |
User |
Adds a user (person, role or group) that has access to the command or menu. |
<User name="Test Everything"/> <User name="role_GlobalUser"/> |
WindowHeight |
Defines the window height if target location is popup |
<WindowHeight>600</WindowHeight> |
WindowWidth |
Defines the window width if target location is popup |
<WindowWidth>800</WindowWidth> |
The example table below illustrates how to define an XML based table.
<?xml version="1.0" encoding="UTF-8"?>
<Table>
<DisplayName>Purchase Info</DisplayName>
<DisplayName locale="de"></DisplayName>
<Column>
<Expression>name</Expression>
<Href>${ROOT_DIR}/ModifyPurchaseOrder.jsp</Href>
<TargetLocation>popup</TargetLocation>
<WindowHeight>500</WindowHeight>
<WindowWidth>600</WindowWidth>
<Label>PO</Label>
<Name>name</Name>
</Column>
<Column>
<Expression>$<to[relationship_PurchaseOrder].from.name]></Expression>
<Label>Customer</Label>
<Name>customer</Name>
</Column>
<Column>
<Expression>originated</Expression>
<Label>Created</Label>
<Name>created</Name>
</Column>
<Column *usesBusinessObject="false">*
<Expression>$<attribute[attribute_NumberOfUsers]></Expression>
<Label>Nr of Users</Label>
<Editable>true</Editable>
<Name>status</Name>
</Column>
<Column>
<Expression>$<attribute[attribute_Notes]></Expression>
<Label>Notes</Label>
<Editable>true</Editable>
<InputType>textarea</InputType>
<Cols>60</Cols>
<Rows>5</Rows>
<TextLength>30</TextLength>
<AllowShowMore>true</AllowShowMore>
<Name>status</Name>
</Column>
<Column>
<Label>Status</Label>
<Name>status</Name>
<Expression>current</Expression>
</Column>
</Table>
Table column definitions could be defined in separate files and referenced from the table definition. The separate column definitions enable you to have a single definition for a column used throughout the application.
<Column ref="tvc:tablecolumn/MyColumn.xml"/>
Parts of a referenced column could be overridden in the context of a table definition simply by defining the parts to change within the referenced column element.
The example below will change the label of the referenced column in the context of the xml table definition:
<Column ref="tvc:tablecolumn/MyColumn.xml">
<Label>Overridden label</Label>
</Column>
By default, a column expression applies to the business object. If you want it to apply on the relationship, use the attribute "usesBusinessObject" on the "<Column>" element.
<Column usesBusinessObject="false">
<Expression><![CDATA[$<attribute[attribute_NumberOfUsers]>]]></Expression>
<Label>Nr of Users</Label>
<Editable>true</Editable>
</Column>
When entering certain characters that is sensitive in XML documents, like "<", ">", "&" etc., these must be escaped. There are two ways to do this:
<Expression>$<attribute[attribute_Test]></Expression>
Or using the CDATA:
<Expression><![CDATA[$<attribute[attribute_Test]>]]></Expression>
Note that expressions with symbolic names can use the new format that is more XML friendly
<Expression>${attribute[attribute_Test]}</Expression>
You can choose either of these approaches.
The table below shows the sub elements that are supported for a Table element.
Element Name | Description | Example |
---|---|---|
DisplayName |
Defines the displayed name of the table. |
<DisplayName>My Table</DisplayName> <DisplayName locale="de">Meine Tabell</DisplayName> |
Column |
Container element for the column definition |
- |
The table below shows the sub elements that are supported within the column element.
Element Name | Description | Example | ||||
---|---|---|---|---|---|---|
AccessExpression |
Defines the setting "Access Expression" |
<AccessExpression>policy == 'Test'</AccessExpression> |
||||
AccessFunction |
Defines the setting "Access Function" |
<AccessFunction>checkAccess</AccessFunction> |
||||
AccessMask |
Defines the setting "Access Mask" |
<AccessMask>read</AccessMask> |
||||
AccessProgram |
Defines the setting "Access Program" |
<AccessProgram>MyAccessProgram</AccessProgram> |
||||
AdminType |
Defines the setting "Admin Type" |
<AdminType>Type</AdminType> |
||||
AllowMultipleEdit |
Defines the setting "Allow Multiple Edit" |
<AllowMultipleEdit>true</AllowMultipleEdit> |
||||
AllowShowMore |
Defines the setting "Allow Show More" |
<AllowShowMore>true</AllowShowMore> |
||||
AllowedInCharts |
This setting can be used to control if the column will have the multiple update icon present in the header. |
*True (Default) *False |
||||
Alt |
Defines the alternate message. The alternate message can be defined in multiple languages. |
<Alt>Add</Alt> <Alt locale="sv">Lägg till</Label> <Alt localt="de">Addieren</Label> |
||||
AlternateOIDExpression |
Defines the setting "Alternate OID Expression" |
<AlternateOIDExpression>from[EBOM].to.id</AlternateOIDExpression> |
||||
AlternateTypeExpression |
Defines the setting "Alternate Type Expression" |
<AlternateTypeExpression>from[EBOM].to.type</AlternateTypeExpression> |
||||
AlwaysVisible |
This setting is used to disallow hiding the column. |
|
||||
AutoCompleteHandler |
This settings is used to define which autocomplete handler to use. This setting requires the column type to be set to autocomplete. See more details in the Autocomplete chapter for built-in column Data Handlers and Cell Renderers. |
|
||||
AutoCompleteSettings |
Settings for autocomplete handler. See autocomplete chapter in TVC Core Admin guide for more details. |
|
||||
CalculateAverage CalculateMaximum CalculateMedian CalculateMinimum CalculateStandardDeviation CalculateSum CalculationDecimalPrecision |
These settings can be used to apply table calculations of the cells within the column. |
|
||||
CardID |
Defines the setting "Card ID" |
<CardID>auto</CardID> |
||||
CardLoadScript |
Defines the setting "Card Load Script" |
<CardLoadScript>pageLoad()</CardLoadScript> |
||||
CardReloadable |
Defines the setting "Card Reloadable" |
<CardReloadable>true</CardReloadable> |
||||
CardTitle |
Defines the setting "Card Title" |
<CardTitle>MyCard</CardTitle> |
||||
CardWidth |
Defines the setting "Card Width" |
<CardWidth>400</CardWidth> |
||||
CellRendererClass |
Defines the setting "Cell Renderer Class" |
<CellRendererClass>com.acme.MyCellRenderer</CellRendererClass> |
||||
CellEditableExpression |
Defines the setting "Cell Editable Expression" |
<CellEditableExpression>current != 'Release'</CellEditableExpression> |
||||
CellShowableExpression |
Defines the setting "Cell Showable Expression" |
<CellShowableExpression>current != 'Release'</CellShowableExpression> |
||||
CheckFromAccess |
Defines the setting "Check From Access" |
<CheckFromAccess>true</CheckFromAccess> |
||||
CheckToAccess |
Defines the setting "Check To Access" |
<CheckToAccess>false</CheckToAccess> |
||||
ColumnIcon |
Defines the setting "Column Icon" |
<ColumnIcon>${ROOT_DIR}/Icon.gif</ColumnIcon> |
||||
Columns |
Defines the setting "Columns" |
<Columns>25</Columns> |
||||
ColumnType |
Defines the setting "Column Type" |
<ColumnType>program</ColumnType> |
||||
ColumnWidth |
Defines the setting "Column Width" |
<ColumnWidth>250</ColumnWidth> |
||||
DataHandlerClass |
Defines the setting "Data Handler Class" |
<DataHandlerClass>my.package.MyDataHandler</DataHandlerClass> |
||||
DecimalFormat |
This setting defines a custom decimal format to use for the display values of numerical cells. See java.text.DecimalFormat for more details on the format syntax. |
A string value pattern conforming to the java.text.DecimalFormat syntax Example: |
||||
DecimalFormatScale |
Scales a numerical cell value equal to (value * 10n) where n is the configured value. The scale will only apply if Decimal Format is present. |
Example (millions): -6 |
||||
Description |
Defines the description of the column. The description can be defined in multiple languages. |
<Description>The default description</Description> <Description locale="de">…</Description> |
||||
DisplaySeparator |
Defines the setting "Display Separator" |
<DisplaySeparator>, </DisplaySeparator> |
||||
Editable |
Defines the setting "Editable" |
<Editable>false</Editable> |
||||
EditableExpression |
Defines the setting "Editable Expression" |
<EditableExpression>current != 'Released'</EditableExpression> |
||||
EditableFunction |
Defines the setting "Editable Function" |
<EditableFunction>doEdit</EditableFunction> |
||||
EditableMask |
Defines the setting "Editable Mask" |
<EditableMask>modify,lock</EditableMask> |
||||
EditableProgram |
Defines the setting "Editable Program" |
<EditableProgram>MyEditProgram</EditableProgram> |
||||
ExcelDataFormat |
Defines the setting "Excel Data Format" |
<ExcelDataFormat>0.00</ExcelDataFormat> |
||||
ExcludeFromReport |
This setting defines if the column should appear in reports / exports of the table. |
|
||||
Expression |
Defines the expression for the column |
<Expression><![CDATA[$<attribute[attribute_Currency]></Expression> <Expression>name</Expression> |
||||
Finder |
Defines if the column should be searchable in the finder search form. |
|
||||
FinderLabel |
Displayed in the search form to identify the search field. If omitted the label of the column is used. |
|||||
FinderOrder |
A number value used to define in what order to display the fields in the search form. The column with the lowest order number is displayed first. |
Any integer value. |
||||
FinderTooltip |
Additional information displayed when mouse cursor is hovering the search field. |
|||||
FinderType |
Defines the type of search field to use. |
|
||||
Fixed |
Defines the setting "Fixed" |
<Fixed>true</Fixed> |
||||
Format |
Defines the setting "Format" |
<Format>integer</Format> |
||||
Function |
Defines the setting "Function" |
<Function>myFunction</Function> |
||||
Groupable |
Defines if the column is groupable. By default, the groupable value is the same as the setting "Allowed In Charts". |
|
||||
GroupHeader |
Defines the group header for a column. |
<GroupHeader>The group header</GroupHeader> <GroupHeader locale="sv">Swedish value</GroupHeader> |
||||
GroupHeaderIsHTML |
Defines if the group header is in HTML format |
A Boolean. |
||||
HeaderRotationAngle |
An integer specifying the rotation in degrees for the header. |
An integer, default is 0. |
||||
HeaderNoWrap |
Defines the setting "Header No Wrap" |
<HeaderNoWrap>false</HeaderNoWrap> |
||||
HeaderNoWrapOnPrint |
This setting defines whether or not the header text for a column may wrap or not when the table page is generated in PDF. |
|
||||
HeaderNoWrapOnExport |
This setting defines whether or not the table header text for a column may wrap or not when the table is exported to Excel.
|
|
||||
Hidden |
Defines the setting "Hidden" |
<Hidden>false</Hidden> |
||||
Href |
Defines the Href setting |
<Href>${ROOT_DIR}/SomePage.jsp</Href> |
||||
IconClass |
Defines the "Icon Class" settings |
<IconClass>fa fa-tags<IconClass> |
||||
InCellEdit |
Allow toggle single cell edit state |
|
||||
InputType |
Defines the setting "Input Type" |
<InputType>textarea</InputType> |
||||
Label |
Defines the label for column. The label can be defined in multiple languages. |
<Label>Add</Label> <Label locale="sv">Lägg till</Label> <Label locale="de">Addieren</Label> |
||||
LinkTypeIcon |
Whether to add icons on links to business objects (i.e. when the mxLink is used). |
|
||||
Locked |
This setting defines if the column is "locked" in the table; e.g. if the user can re-arrange it or not.
|
|
||||
MatchRangeOnObjectId |
This setting can be used to specify that the range value should be matched against the object-id associated with the cell. By default, the range value is matched against the value of the cell. |
|
||||
MatchRangeOnRelationshipId |
This setting can be used to specify that the range value should be matched against the relationship-id associated with the cell. By default, the range value is matched against the value of the cell. |
|
||||
NavigationColumnEnabled |
Used to disable the use of certain columns as navigation column. |
|
||||
NoWrap |
Defines the setting "No Wrap" |
<NoWrap>false</NoWrap> |
||||
NoWrapOnPrint |
This setting defines whether the column’s values will be wrapped or not when the table page is generated in PDF. |
|
||||
NoWrapOnExport |
This setting defines whether the column’s values will be wrapped or not when the table page is exported to Excel.
|
|
||||
PopupModal |
Defines the setting "Popup Modal" |
<PopupModal>false</PopupModal> |
||||
PreserveOutput |
Defines the setting "Preserve Output" |
<PreserveOutput>false</PreserveOutput> |
||||
Printable |
Defines if the column should be present in the printerfriendly format of the table |
|
||||
Program |
Defines the setting "Program" |
<Program>MyProgram</Program> |
||||
RangeFunction |
Defines the setting "Range Function" |
<RangeFunction>getRanges</RangeFunction> |
||||
RangeHandlerClass |
The name of a class, which provides the column with range values. The class must implement the interface:
|
com.company.MyRangeHandler |
||||
RangeProgram |
Defines the setting "Range Program" |
<RangeProgram>MyRangeProgram</RangeProgram> |
||||
RegisteredSuite |
Defines the setting "Registered Suite" |
<RegisteredSuite>Framework</RegisteredSuite> |
||||
RenderAsRowAction |
As of TVC 2012.1.0, it is possible to configure the Structure Browser to provide a row-actions menu holding common actions that applies to a row. This setting can be used to move a column that otherwise would have been displayed in a separate column into this menu. Note that all columns cannot be moved, there are some requirements. |
|
||||
RotatedHeaderFont |
The font to be used for rotated headers. The value should be a value acceptable by the
|
|
||||
Rows |
This setting applies to the input elements of type "textarea" when a column is rendered in edit mode. The value should be an integer defining the height of the input element. |
<Rows>40</Rows> |
||||
Searchable |
This setting can be used to disallow using the column within the structure search function. |
|
||||
Setting |
Defines a custom setting |
<Setting name="Name of Setting">Value</Setting> |
||||
ShowAlternateIcon |
Defines the setting "Show Alternate Icon" |
<ShowAlternateIcon>false</ShowAlternateIcon> |
||||
ShowObjectImage |
Defines the setting "Show Object Image" |
<ShowObjectImage>false</ShowObjectImage> |
||||
ShowTypeIcon |
Defines the setting "Show Type Icon" |
<ShowTypeIcon>false</ShowTypeIcon> |
||||
Sortable |
Defines the setting "Sortable" |
<Sortable>true</Sortable> |
||||
SortComparator |
Defines the setting "Sort Comparator" |
<SortComparator>my.package.MyComparator</SortComparator> |
||||
SortDirection |
Defines the setting "Sort Direction" |
<SortDirection>ascending </SortDirection> |
||||
SortOrder |
Defines the setting "Sort Order" |
<SortOrder>1 </SortOrder> |
||||
SortType |
Defines the setting "Sort Type" |
<SortType>numeric</SortType> |
||||
SortRangeValues |
||||||
StyleHeader |
Apply custom style information to the table header. Note that you might override important styles, use this feature with caution. |
|
||||
StyleCell |
Apply custom style information to a table cell. JavaScript is applicable for dynamic cell styles. Call print to add style information. Available JavaScript variables:
|
OR (dynamical)
|
||||
StyleCellValue |
Apply custom style information to a table cell value. JavaScript is applicable for dynamic cell value styles. Call print to add style information. Available JavaScript variables: * values (list of the available cell values) * value (cell value) * relationshipType (row relationship type) * type (cell value object type) * name (row object name) * revision (row object revision) * policy (row object policy) * state (row state) * rowNumber (the number of the row)
|
|||||
StyleCalculation |
Apply custom style information to a table calculation. JavaScript is applicable for dynamic table calculation styles. Call print to add style information. Available JavaScript variables: * value (calculation value) * type (calculation type AVERAGE, MAXIMUM, MEDIAN, MINIMUM, STDDEV or SUM)
|
OR (dynamic)
|
||||
TargetLocation |
Defines the setting "Target Location" |
<TargetLocation>popup</TargetLocation> |
||||
TextAlign |
Text Align |
<TextAlign>center</TextAlign> |
||||
TextLength |
Defines the setting "Text Length" |
<TextLength>40</TextLength> |
||||
Translate |
Defines the setting "Translate" |
<Translate>true</Translate> |
||||
UpdateFunction |
Defines the setting "Update Function" |
<UpdateFunction>doUpdate</UpdateFunction> |
||||
UpdateProgram |
Defines the setting "Update Program" |
<UpdateProgram>UpdateProgram</UpdateProgram> |
||||
User |
Adds a user (person, role or group) that has access to the command or menu. |
<User name="Test Everything"/> <User name="role_GlobalUser"/> |
||||
UseRule |
Defines the setting "Use Rule" |
<UseRule>true</UseRule> |
||||
Visible |
Defines the setting "Visible" |
<Visible>true</Visible> |
||||
VisibleInEditMode |
Defines the setting "Visible In Edit Mode" |
<VisibleInEditMode>false</VisibleInEditMode> |
||||
VisibleInFlatMode |
Defines the setting "Visible In Flat Mode" |
<VisibleInFlatMode>true</VisibleInFlatMode> |
||||
VisibleInReadMode |
Defines the setting "Visible In Read Mode" |
<VisibleInReadMode>true</VisibleInReadMode> |
||||
VisibleInStructureMode |
Defines the setting "Visible In Structure Mode" |
<VisibleInStructureMode>false</VisibleInStructureMode> |
||||
WindowHeight |
Defines the setting "Window Height" |
<WindowHeight>800</WindowHeight> |
||||
WindowWidth |
Defines the setting "Window Width" |
<WindowWidth>500</WindowWidth> |
Below is an example of a filter that applies to relationships
<Filter>
<Label>The name of the filter</Label>
<Label locale="de">A localized name</Label>
<TypePattern>
<Type>relationship_EBOM</Type>
<Type>relationship_PartSpecification</Type>
</TypePattern>
<!-- Direction -->
<From/>
<!-- Uncomment for to direction -->
<!-- <To/> -->
<Where>the where expression</Where>
</Filter>
Below is an example of a filter that applies to business objects
<Filter appliesTo="object">
<Label>The name of the filter</Label>
<Label locale="de">A localized name</Label>
<TypePattern>
<Type>type_Part</Type>
<Type>type_AnotherType</Type>
</TypePattern>
<NamePattern>
<Name>...</Name>
<Name>...</Name>
</NamePattern>
<RevisionPattern>
<Revision>...</Revision>
<Revision>...</Revision>
</RevisionPattern>
<OwnerPattern>
<Owner>...</Owner>
<Owner>...</Owner>
</OwnerPattern>
<VaultPattern>
<Vault>vault_eServiceProduction</Vault>
</VaultPattern>
<Where>the where expression</Where>
</Filter>
As seen in the example above, the XML filter definition allows using symbolic names for the type pattern and vault pattern.
Filters by default return object id as their output for further processing and it is set on the nodes of Structure Browser. Sometimes, it is necessary to get physical id instead of object id. tvc.core.usePhysicalId=true can be set globally to enable this feature.
|
Below is an example of an inquiry defined in XML format.
<Inquiry>
<Code>expand bus ${ID} from rel "${REL}" select bus id select rel id
dump |</Code>
<Format>${OID}</Format>
<Pattern>${LEVEL}|*|${DIRECTION}|*|*|*|${OID}|${RELID}</Pattern>
<Argument name="REL" value="relationship_EBOM"/>
</Inquiry>
The XML format of a "Search Form" is exactly the same as when defined in a page object.
The full specification for the format of the Create/Edit form is found within the "Structure Browser Administrators Guide". Below is a brief example.
<?xml version="1.0" encoding="UTF-8"?>
<Form id="CreateConnectPart">
<Header>Create Part</Header>
<SubHeader>Simple create form for creating/connecting parts</SubHeader>
<RunOncePerSelection />
<Connect>
<Relationship>relationship_EBOM</Relationship>
<Direction>from</Direction>
</Connect>
<Tab>
<Label>Basic</Label>
<TypeField>
<Required />
<DefaultValue>type_HardwarePart</DefaultValue>
<TypePattern>type_SoftwarePart</TypePattern>
<TypePattern>type_HardwarePart</TypePattern>
</TypeField>
<NameField>
<Editable />
<Required />
<AutoName />
</NameField>
<Include ref="tvc:formfield:tvx:enc/Revision.xml"/>
<PolicyField>
<Required />
<DefaultValue>policy_ECPart</DefaultValue>
</PolicyField>
<VaultField>
<Required />
<ReadOnly />
<DefaultValue>vault_eServiceProduction</DefaultValue>
</VaultField>
<Field>
<Label>Description</Label>
<MapsTo>description</MapsTo>
<Required />
<Multiline />
<ClearEnabled />
<Validation>
<MinChars>10</MinChars>
</Validation>
</Field>
</Tab>
</Form>
The XML format of a file package download configuration is same as when it is stored inside the page object. The only difference is that each FPD configuration is defined in its own file. When stored inside the page object in the database, all configurations are stored in the same object.
The XML format of a XBL configuration is same as when it is stored inside the page object. The only difference is that each XBL configuration is defined in its own file. When stored inside the page object in the database, all configurations are stored in the same object.
The XML format of a "Grid Browser Configuration" is exactly the same as when defined in a page object.
Below is an example of a "Page Configuration", defined in XML format.
<PageConfiguration>
<Visible view="true"/>
<Visible table="false"/>
<Visible filter="false"/>
<Visible expand="true"/>
<Visible sort="true"/>
<Visible edit="true"/>
<Visible gothere="false"/>
<Visible reload="true"/>
<Visible structuresearch="false"/>
<Visible disconnect="false"/>
<Visible advancedfilter="true"/>
<Visible columnfilter="true"/>
<Visible chart="true"/>
<Visible datagroup="true"/>
<Visible preferences="true"/>
<Visible trigger="true"/>
<Visible compare="true"/>
<Visible promote="true"/>
<Visible demote="true"/>
<Views>
<View name="tvc:view/PurchaseOrder1.xml" default="true"/>
<View name="tvc:view/PurchaseOrder2.xml"/>
</Views>
<RowSelect>Multiple</RowSelect>
<Counter>True</Counter>
<ExpandTo>1</ExpandTo>
<InitiallyEditable>FALSE</InitiallyEditable>
<PaginationSize>-1</PaginationSize>
<PrinterFriendly>TRUE</PrinterFriendly>
<ExportTableData>TRUE</ExportTableData>
<AddToCollection>TRUE</AddToCollection>
<ManageCollections>TRUE</ManageCollections>
<Header>Purchase Orders</Header>
<ToolBar>tvc:menu/MyToolbar.xml</ToolBar>
<ContextMenu>tvc:menu/MyContextMenu.xml</ContextMenu>
</PageConfiguration>
Below is an example of a "Search Configuration", defined in XML format.
<SearchConfig>
<Header>Find Purchase Order</Header>
<SubHeader>Enter search criteria below</SubHeader>
<AllowOpenCollection>false</AllowOpenCollection>
<AllowExecuteSavedQuery>false</AllowExecuteSavedQuery>
<FindLikeTypes>
<FindLikeType name="type_PurchaseOrder"/>
</FindLikeTypes>
<SearchForms>
<SearchForm default="true" name="tvc:searchform/FindPurchaseOrder.xml"/>
</SearchForms>
<PageConfiguration>tvc:pageconfig/PurchaseOrder.xml</PageConfiguration>
</SearchConfig>
Below is an example of a "Build Structure Configuration", defined in XML format.
<BuildStructure>
<Header>Select Purchase Order(s) to Add</Header>
<SubHeader></SubHeader>
<RelationshipDirection>From</RelationshipDirection>
<AllowRelationshipChange>false</AllowRelationshipChange>
<AllowRelationshipAttributeEdit>false</AllowRelationshipAttributeEdit>
<AllowReplace>false</AllowReplace>
<AllowMove>false</AllowMove>
<Relationships>
<Relationship name="relationship_PurchaseOrder" default="true"/>
</Relationships>
<AllowOpenCollection>False</AllowOpenCollection>
<AllowExecuteSavedQuery>False</AllowExecuteSavedQuery>
<SearchForms>
<SearchForm default="true" name="tvc:searchform/FindPurchaseOrder.xml"/>
</SearchForms>
<PageConfiguration>tvc:pageconfig/PurchaseOrder.xml</PageConfiguration>
</BuildStructure>
Below is an example of a "View", defined in XML format.
<View>
<DisplayName>Purchase Orders</DisplayName>
<Role>role_GlobalUser</Role>
<Filter enabled="true">PurchaseOrder</Filter>
<Filter enabled="true">OrderedItem</Filter>
<Table enabled="true">tvc:table/PurchaseOrder1.xml</Table>
<Table>tvc:table/PurchaseOrder2.xml</Table>
<ToolBar>tvc:menu/PurchaseOrdersToolBar.xml</ToolBar>
<ContextMenu>tvc:menu/MyContextMenu.xml</ContextMenu>
<ExpandMode>filter-fixed</ExpandMode>
<DisplayMode>tiled</DisplayMode>
</View>
All reports contain a section that is common for all report types. This is shown below:
<Name>PDX</Name>
<Description>The description...</Description>
<Description locale="de">...</Description>
<Hidden>TRUE</Hidden>
<Global>FALSE</Global>
<Stylesheet>tvc:stylesheet:tvx:enc/PDXStylesheet.xslt</Stylesheet>
<Table>tvc:table:tvx:enc/PDXExport.xml</Table>
<OutputFormat>HTML</OutputFormat>
<!--<DisplayedOutputFormat>Html</DisplayedOutputFormat>-->
<FilterExpression>type.kindof[Part] == TRUE</FilterExpression>
<PreProcessPage>/my/PreProcessPage.jsp</PreProcessPage>
<Settings>
<Setting name="outputHandlers">mail,ftp</Settings>
<Setting name="fileOnDemand" value="false"/>
</Settings>
<TransformerProperties>
<Property name="pageSize" value="A4"/>
</TransformerProperties>
<!-- below: report type specific elements -->
The root element for each report type is different. |
<ExpansionReport>
<!-- Common elements -->
<RelationshipPattern>
<Relationship>relationship_EBOM</Relationship>
</RelationshipPattern>
<TypePattern>
<Type>type_Part</Type>
</TypePattern>
<From>true</From>
<To>false</To>
<ExpandDepth>0</ExpandDepth>
<ObjectWhere>current == Release</ObjectWhere>
<RelationshipWhere>attribute[Find Number] != ''</RelationshipWhere>
<LoadRootInquiry>tvc:inquiry:tvx/MyInquiry.xml</LoadRootInquiry>
</ExpansionReport>
<InquiryReport>
<!-- Common elements -->
<Inquiry>tvc:inquiry:tvx/MyInquiry.xml</Inquiry>
</InquiryReport>
<AdvancedReport>
<!-- Common elements -->
<Definition>
<DataSet id="ds1">...
<DataSet id="ds2">...
<Report>
<TableDataSection...>
</Report>
</Definition>
</AdvancedReport>
The content within the <Definition> element is exactly the
same as the content of the attribute "TVC Data Extraction Definition".
E.g. the specification for the format of the definition section is found
within the "Report Generator Administrators Guide".
|
The XML Schema files (XSD) define what elements and attributes this is possible to use in the configuration XML files. Each type of resource (e.g. Command, PageConfig and Table) comes with its own schema file describing how it can be configured.
There are a number of advantages of using XML schema files. In many code editors, e.g. Eclipse, you get auto complete which reduces the need to remember all the configuration options. Documentation explaining what the configuration does is displayed along with the available options. In case an incorrect configuration is done it will be highlighted in the editor.
In each XML file you include a reference to the XSD.
Example of how to reference an XSD in a command configuration:
<?xml version="1.0" encoding="UTF-8"?>
<Command xmlns="http://technia.com/TVC/Menu"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://technia.com/TVC/Menu
http://products.technia.com/tvc/schema/latest/Command.xsd">
<!-- Configuration goes here -->
</Command>
The xmlns
attribute tells the schema validator that all elements used in
the XML document is found in this namespace. This value is specific for
each resource type. See below for details on which namespace to
use for what resource type.
The xmlns:xsi
attribute declares a namespace with the prefix xsi. This
section is the same for each resource type.
The xsi:schemaLocation
defines where the schema is located for a
namespace. The attribute contains two values separated with a space. The
first value is the namespace and the second value is the location to the
schema. See below for details on locations.
Resource Type | Location | Namespace | XSD |
---|---|---|---|
Build Structure Config |
/buildstructureconfig |
BuildStructureConfig.xsd |
|
Chart Config |
/chartconfig |
ChartConfig.xsd |
|
Command |
/command |
Command.xsd |
|
Compare |
/compare |
Compare.xsd |
|
Dashboard |
/dashboard |
Dashboard.xsd |
|
DataSet |
/dataset |
DataSet.xsd |
|
Filter |
/filter |
Filter.xsd |
|
Create/Edit Form |
/form |
Form.xsd |
|
Create/Edit Form Field |
/formfield |
FormField.xsd |
|
Create/Edit Form Sort Config |
/formsortconfig |
FormSortConfig.xsd |
|
File Package Config |
/fpd |
FPDConfig.xsd |
|
Gadgets |
/gadgets |
Gadgets.xsd |
|
Grid Browser Config |
/gridbrowserconfig |
GridBrowserConfig.xsd |
|
Image Flow |
/imageflow |
ImageFlow.xsd |
|
Inquiry |
/inquiry |
Inquiry.xsd |
|
Menu |
/menu |
Menu.xsd |
|
Page Configuration |
/pageconfig |
PageConfig.xsd |
|
Expansion Report |
/report |
Report.xsd |
|
Inquiry Report |
/report |
Report.xsd |
|
Custom Report |
/report |
Report.xsd |
|
JPO Report |
/report |
Report.xsd |
|
Advanced Report |
/report |
Report.xsd |
|
Search Config |
/searchconfig |
SearchConfig.xsd |
|
Search Form |
/searchform |
SearchFormConfig.xsd |
|
Table |
/table |
Table.xsd |
|
Table Column |
/tablecolumn |
TableColumn.xsd |
|
Top Panel |
/toppanel |
TopPanel.xsd |
|
Top Panel Form |
/toppanelform |
TopPanelForm.xsd |
|
View |
/view |
View.xsd |
|
XBL Configuration |
/xblconfig |
XBLConfig.xsd |
|
TVC Discussion Config |
WEB-INF/classes |
DiscussionConfig.xsd |
|
TVC Collaboration Filter |
WEB-INF/classes |
CollaborationFilter.xsd |
The first alternative is to use references to the XSD valid for a specific version of TVC.
Location format:
http://products.technia.com/tvc/schema/<version>/<name-of-xsd>
Example using version specific schema:
http://products.technia.com/tvc/schema/2014.1/Command.xsd
The second alternative is to reference the latest available schema files. These files are updated continuously when new configuration options becomes available. Using this location reduces the effort to upgrade TVC as you don’t need to update references in each xml config file.
Location format:
http://products.technia.com/tvc/schema/latest/<name-of-xsd>
Example using latest schema:
http://products.technia.com/tvc/schema/latest/Command.xsd