Configuring right-to-left format in a data visualization field


A data visualization field (DVF) can be a part of more than one view, and because text direction is associated with a view, the text direction for a DVF is not known until the DVF is initialized. This initialization takes place when the browser renders the view of the AR System form. At that time, a request with text direction is sent to the DVF.

If you create a DVF and you want to create different contents based on text direction, extract the text direction from the PluginContext. Because the DVF cannot determine your intent about text direction, add the text direction to your HTML content for the DVF (for example, by using the <html dir='rtl'> option).

To extract the text direction

Use the com.remedy.arsys.plugincontainer.ARLocaleServiceProperties interface through the public String getProperty(String key, String defvalue); method.

The following example extracts the text direction from the PluginContext object given com.remedy.arsys.plugincontainer.PluginContext pc;

ARLocaleServiceProperties p = (ARLocaleServiceProperties)pc.getLocaleService();
  boolean isRTL = false;
  String val = p.getProperty("rtl", "false");
  if (val.equalsIgnoreCase("true"))
     isRTL = true;

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*