Products | Versions |
---|---|
TIBCO EBX | All versions |
Declaring global formatting policy:
If you have various language packs and facing issues with formatting reflection with specified language. If the formatting is reflected with one language pack and not with another you can follow the below steps to set the formatting policy.
1. Build a jar that respects the following tree: com/orchestranetworks/i18n/frontEndFormattingPolicy_xx.xml (example with English: frontEndFormattingPolicy_en.xml)
2. Deploy the jar in the exact location as ebx.jar
Below is a sample of the formatting policy which needs to be declared in frontEndFormattingPolicy_en.xml :-
-------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<formattingPolicy xsi:schemaLocation="urn:ebx-schemas:formattingPolicy_1.0 ../schema/ebx-reserved/formattingPolicy_1.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:ebx-schemas:formattingPolicy_1.0">
<date pattern="MM/dd/yyyy"/>
<time pattern="HH:mm:ss"/>
<dateTime pattern="MM/dd/yyyy HH:mm"/>
<decimal pattern="00,00,00.000" decimalSeparator="^" groupingSeparator="|"/>
<int pattern="0" groupingSeparator=""/>
</formattingPolicy>
-------------------------------------------------------
The changes are to be done in the above format as per the requirement. For example, if you want an integer value to be visible in the format as:
1----> 000001
2----> 000002
-----------------------------------------------------------------------------------<?xml version="1.0" encoding="UTF-8"?>
-<formattingPolicy xsi:schemaLocation="urn:ebx-schemas:formattingPolicy_1.0 ../schema/ebx-reserved/formattingPolicy_1.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:ebx-schemas:formattingPolicy_1.0">
<date pattern="MM/dd/yyyy"/> // change in date pattern eg .”dd/MM/yyyy”
<time pattern="HH:mm:ss"/>
<dateTime pattern="MM/dd/yyyy HH:mm"/>
<decimal pattern="00,00,00.000" decimalSeparator="^" groupingSeparator="|"/>
<int pattern="0" groupingSeparator=""/> //change in the format of int pattern eg.”000000”
</formattingPolicy>
-----------------------------------------------------------------------------------------
After the format change:-
<int pattern="000000" groupingSeparator=""/>
In a similar way change in format for the date pattern will reflect the date pattern change on UI
<date pattern="MM/dd/yyyy"/> - - - -> <date pattern="dd/MM/yyyy"/>