Widgets and global rules

Widgets that present input fields should check whether the input field has already been processed by a ZIETrans global rule. When a host screen is received, ZIETrans searches it for host components that match global rules that are defined for that ZIETrans application. When your widget checks whether the input field has already been processed by a ZIETrans global rule, the call returns null if the input field has not been processed. If the input field has already been processed according to a global rule, the call returns the transformation fragment to which the input field has been transformed by the global rule. Your widget should output the fragment rather than processing the component element. Examples are shown below for Web applications:

String ruleReplacement = 
		RenderingRulesEngine.processMatchingElement(componentElement, contextAttributes);
if (ruleReplacement != null) {
		buffer.append(ruleReplacement);
} else {
    .
    .
    .
}

Add the above example to the drawHTML() method for the widget.