Replacing text strings from the host screen

Your ZIETrans application can replace text strings on host screens with different output on GUI pages. These text strings must be protected text strings, that is, strings that are used only on the screen and never passed to the host application as input. For example, you can replace the text string used as a field label or prompt. You can replace text with different text, HTML coding, or images. Java™ regular expression support can be use as part of the text replacement algorithm. Text strings can even be replaced with a button or link that sends a host key.

You can define text replacement in various ways within a project:
  • In the project settings, which replaces the specified text on any screen within the project
  • In a rendering item in a default rendering set
  • In a screen event, which replaces the specified text only on screens that match the screen recognition criteria for that screen event
  • In the insert host component wizard, which replaces the specified text only in the inserted component
If you define text replacement for the same text in both the project settings and in a screen event with different replacement output, the screen event definition takes precedence. If you define text replacement for the same text in both the screen event and component tag level, the component tag level text replacement takes precedence.

Text replacement using another text string attempts to maintain the original screen layout. If the replacement text is longer than the text to be replaced, the replacement text is truncated to fit into the original field size. However, if there is available white space between the text replacement field and the next host component, the replacement string uses that white space for the next characters of your replacement string.

Text replacement with either HTML strings or images does not preserve the original screen layout, because the replacement output might not fit into the original field size. This might cause undesirable formatting results in the GUI.
Note: The field widget has an option to render the output on a character by character basis. If you use the field widget, with this option set, to render the section of the host screen that is replaced with an image, undesirable formatting will occur.

When replacing text with any chosen replacement, be sure to test your text replacements carefully to be sure that they do not give unexpected results.

For more information about text replacement see Text Replacement.