![]() |
Copyright © TIBCO Software Inc. All Rights Reserved |
To view the sample for this task, import the advanced sample projects as described in Import the Forms Advanced Samples. The sample form and business object model for the task described in this section are contained in the forms.samples.controls project.The form (ListControl.form) is at the following location:
1. Add new data parameters strArray, intArray, and decArray of the respective types Text, Integer, and Decimal. All of these should be of array type.
2. Add three Text controls with labels Text List, Integer List, and Decimal List in to the form. Set the names of these controls to textList, integerList, and decimalList.Go to the General tab and add a new binding for the Value that points to the value of the respective data parameter array.
4. Add a new button Add Item to the form.Add a new rule for this button and associate following action script for the Select event of this button. This script will add the last item into the list.
5. Add a new button Delete Item to the form.Add a new rule for this button and associate the following action script for the Select event of this button. This script will delete the last item from the list.
6. For the text control named Text List, add the following validation script for the On Value Change event. This validation is successful when the item added in the list control starts with Text. Otherwise, a problem marker appears near the list control.
![]() |
Copyright © TIBCO Software Inc. All Rights Reserved |