TFT display only |
GetExternalInformation is used to retrieve external information from a third party.
A click function makes a request to WebOffice with code/license-plate or via the current article. WebOffice fetches the information from an external system, and return it to the CWT for parsing.
Currently a simple json format is supported.
Any attribute in the response can be used and the corresponding value is shown in the display. The attributes to show and formatting is defined in the UI.xaml and translation can be used via translation.xml
The following parts are to be used:
•OnGetExternalInformationInputDone
•input text box: GetExternalInformationInput
•GetExternalInformationStartedPopup
•GetExternalInformationDonePopup
•GetExternalInformationCommunicationFailedPopup
•GetExternalInformationErrorLabel
•GetExternalInformationLabel
formatted text command "@json:"
Example:
Example of a label and command:
find the keyword “@GEIBrand” in the response. “@json:brand”
<TFT:Label Name="GetExternalInformationLabel1" FormattedText="@GEICarType@json:type@" MxStyle="{PopupTextGEILabelStyle}" Location="100,120" />
<TFT:Label Name="GetExternalInformationLabel2" FormattedText="@GEIBrand@json:brand@" MxStyle="{PopupTextGEILabelStyle}" Location="100,120" />
<TFT:Label Name="GetExternalInformationLabel3" FormattedText="@GEIModel@json:model@" MxStyle="{PopupTextGEILabelStyle}" Location="100,200" />
<TFT:Label Name="GetExternalInformationLabel4" FormattedText="@GEIVersion@json:version@" MxStyle="{PopupTextGEILabelStyle}" Location="100,240" />
<TFT:Label Name="GetExternalInformationLabel5" FormattedText="@GEIFuelType@json:fuel_type@" MxStyle="{PopupTextGEILabelStyle}" Location="100,280" />
Translation
Translation examples
<data key="GetExternalInformationButtonText" value="Hämta fordons 
information"/>
<data key="GetExternalInformationDonePopupText" value="Bekräfta fordonets 
information före köpet"/>
<data key="VerifyTheInformation" value="Bekräfta fordons information."/>
<data key="GEICarType" value="Biltyp:"/>
<data key="GEIBrand" value="Märke:"/>
<data key="GEIModel" value="Bilmodell:"/>
<data key="GEIVersion" value="Version:"/>
<data key="GEIFuelType" value="Bränsle:"/>
<data key="GEIModelYear" value="Årsmodell:"/>
<data key="-1" value="Ej tillgänglig"/>
<data key="\u00d8" value="Ö"/>
<data key="\u00D8" value="Ö"/>
<data key="\u00f8" value="ö"/>
<data key="\u00F8" value="ö"/>
<data key="\u00c6" value="Ä"/>
<data key="\u00C6" value="Ä"/>
<data key="\u00e6" value="ä"/>
<data key="\u00E6" value="ä"/>
<data key="\u00c5" value="Å"/>
<data key="\u00C5" value="Å"/>
<data key="\u00e5" value="å"/>
<data key="\u00E5" value="å"/>
<data key="httpStatusCode000" value="Okänt fel"/>
<data key="httpStatusCode404" value="Registreringsnummer hittades inte"/>
<data key="GetExternalInformationButtonText" value="Get vehicle 
information"/>
<data key="GetExternalInformationDonePopupText" value="Confirm vehicle 
information before purchase"/>
<data key="VerifyTheInformation" value="Confirm vehicle information."/>
<data key="GEICarType" value="Car type:"/>
<data key="GEIBrand" value="Brand:"/>
<data key="GEIModel" value="Carmodel:"/>
<data key="GEIVersion" value="Version:"/>
<data key="GEIFuelType" value="Fuel:"/>
<data key="GEIModelYear" value="Year:"/>
<data key="Personbil" value="Personal Car"/>
<data key="-1" value="N/A"/>
<data key="\u00d8" value="Ø"/>
<data key="\u00D8" value="Ø"/>
<data key="\u00f8" value="ø"/>
<data key="\u00F8" value="ø"/>
<data key="\u00c6" value="Æ"/>
<data key="\u00C6" value="Æ"/>
<data key="\u00e6" value="æ"/>
<data key="\u00E6" value="æ"/>
<data key="\u00c5" value="Å"/>
<data key="\u00C5" value="Å"/>
<data key="\u00e5" value="å"/>
<data key="\u00E5" value="å"/>
<data key="httpStatusCode000" value="Unknown Error"/>
<data key="httpStatusCode404" value="License Plate Not Found"/>
Popup examples
<!--GetExternalInformation popups-->
<TFT:PopupPanel Name="GetExternalInformationDonePopup" MxStyle="{PanelStyle2}">
<Controls>
<!-- START MAIN CONTENT-->
<TFT:Label Name="UserInstructionLabel" MxStyle="{UserInstructionLabelStyle}" FormattedText="GetExternalInformationDonePopupText"/>
<TFT:Label Name="LicensePlateLabel" MxStyle="{LicensePlateLabelStyle}"/>
<TFT:Label Name="UserIdentifierLabel" MxStyle="{UserIdentifierLabelStyle}"/>
<TFT:Label Name="GetExternalInformationLabel1" FormattedText="@GEICarType@json:type" MxStyle="{PopupTextGEILabelStyle}" Location="100,120" />
<TFT:Label Name="GetExternalInformationLabel2" FormattedText="@GEIBrand@json:brand" MxStyle="{PopupTextGEILabelStyle}" Location="100,160" />
<TFT:Label Name="GetExternalInformationLabel3" FormattedText="@GEIModel@json:model" MxStyle="{PopupTextGEILabelStyle}" Location="100,200" />
<TFT:Label Name="GetExternalInformationLabel4" FormattedText="@GEIVersion@json:version" MxStyle="{PopupTextGEILabelStyle}" Location="100,240" />
<TFT:Label Name="GetExternalInformationLabel5" FormattedText="@GEIFuelType@json:fuel_type" MxStyle="{PopupTextGEILabelStyle}" Location="100,280" />
<TFT:Label Name="GetExternalInformationLabel6" FormattedText="@GEIModelYear@json:model_year" MxStyle="{PopupTextGEILabelStyle}" Location="100,320" />
<!-- END MAIN CONTENT-->
<TFT:PiezoButton MxStyle="{AcceptButtonStyle}" Name="AcceptGEI" Click="OnPanelOpenAndCloseCurrentPopup" KeyValue="ArticlePanel"/>
<TFT:PiezoButton MxStyle="{SilentRejectButtonVisualStyle}" Name="GetExternalInformationDonePopupCloseButton" Click="OnSilentReject"/>
<TFT:PiezoButton MxStyle="{LanguageButtonStyle}"/>
</Controls>
</TFT:PopupPanel>
<TFT:PopupPanel Name="GetExternalInformationStartedPopup" MxStyle="{PopupStyle}">
<Controls>
<TFT:ImageRotator MxStyle="{WaitingImageStyle}"/>
<TFT:ImageRotator MxStyle="{InfoImageStyle}"/>
</Controls>
</TFT:PopupPanel>
<TFT:PopupPanel Name="GetExternalInformationCommunicationFailedPopup" MxStyle="{PopupStyle}" Timeout="3" TimeoutEvent="OnSilentReject">
<Controls>
<TFT:Label Name="GetExternalInformationErrorLabel" MxStyle="{PopupTextLabelStyle}" />
</Controls>
</TFT:PopupPanel>
<!--END GetExternalInformation Popups-->