YfcValidateMandatoryNodes

Description

This JavaScript function validates mandatory sections of a screen. The function parses through all the TABLE elements in a page, and for each of the tables, looks for the presence of the yfcMandatoryMessage attribute. If this attribute is found, the function looks into the contents of the table. If the contents have not changed, the function alerts the message set within the yfcMandatoryMessage attribute for the corresponding <table> tag.

Syntax

yfcValidateMandatoryNodes()

Input parameters

None.

Output parameters

None.

Example

The following example shows how mandatory validation is performed before Save in the case of return receiving. First, the Save Operation is configured to call the yfcValidateMandatoryNodes() function.

Second, in the inner panel JSP, the following attribute is set for the table that requires a validation check:

<table class="table" ID="ReceiveLines" width="100%" editable="true" 
 yfcMandatoryMessage="<yfc:i18n>Receipt_information_must_be_entered</yfc:i18n>">