Difference between revisions of "Work with Balloons"
(New page: Category:How to Los ballons son elementos que muestran mensajes provenientes de validaciones (ejecutadas con Ajax) sobre los elementos de nuestras aplicaciones. En el siguiente ejempl...) |
|||
Line 1: | Line 1: | ||
− | [[Category:How to]] | + | [[Category:How to (en)]] |
− | + | The ballons are elements that show messages from validation (performed with Ajax) on the elements of our applications. In the following example it can be seen on the country field the message "No matching country." The place where the message appears is known as the balloon. | |
[[Image:balloon.jpg |center ]] | [[Image:balloon.jpg |center ]] | ||
− | == | + | == Commands for Balloons == |
− | + | To work with them (check if present, if they appear with certain text, or if they are not listed) we have to associate the command with the control where the ballon appears on. | |
+ | |||
+ | That is why we have different commands that help us: | ||
− | |||
* AppearBalloon | * AppearBalloon | ||
* VerifyControlValidation | * VerifyControlValidation | ||
− | + | For balloons that appear within grids | |
* VerifyControlValidationTable | * VerifyControlValidationTable | ||
* AppearBalloonTable | * AppearBalloonTable | ||
− | + | To verify that a ballon appears with a given text we use VerifyControlValidation, or VerifyControlValidationTable when working with a control in a grid. This command gets as important parameters the control over which we want to do the validation, the error message we want to validate and the type of balloon (may be a warning or error). | |
− | + | This way you can express all these possibilities: | |
− | * | + | * any balloon appears |
− | * | + | * no balloon appears |
− | * | + | * display certain text in a warning balloon |
− | * | + | * display certain text in a error balloon |
− | * | + | * certain text is not displayed in a warning balloon |
− | * | + | * certain text is not displayed in a error balloon |
− | == | + | == Example == |
− | + | In the example shown in the figure above, if you want to validate that the error "No matching country" will appear on the Country: | |
+ | VerifyControlText (CountryId, "No matching country", Error). | ||
− | + | To verify that any balloon is displayed you have to use AppearBalloon, and to verify that no balloon appears you must use the same command negated. In the same example if we wanted to validate that a message appears on the control you should use: | |
+ | AppearBalloon (CountryId). |
Revision as of 17:49, 4 May 2010
The ballons are elements that show messages from validation (performed with Ajax) on the elements of our applications. In the following example it can be seen on the country field the message "No matching country." The place where the message appears is known as the balloon.
Commands for Balloons
To work with them (check if present, if they appear with certain text, or if they are not listed) we have to associate the command with the control where the ballon appears on.
That is why we have different commands that help us:
- AppearBalloon
- VerifyControlValidation
For balloons that appear within grids
- VerifyControlValidationTable
- AppearBalloonTable
To verify that a ballon appears with a given text we use VerifyControlValidation, or VerifyControlValidationTable when working with a control in a grid. This command gets as important parameters the control over which we want to do the validation, the error message we want to validate and the type of balloon (may be a warning or error).
This way you can express all these possibilities:
- any balloon appears
- no balloon appears
- display certain text in a warning balloon
- display certain text in a error balloon
- certain text is not displayed in a warning balloon
- certain text is not displayed in a error balloon
Example
In the example shown in the figure above, if you want to validate that the error "No matching country" will appear on the Country:
VerifyControlText (CountryId, "No matching country", Error).
To verify that any balloon is displayed you have to use AppearBalloon, and to verify that no balloon appears you must use the same command negated. In the same example if we wanted to validate that a message appears on the control you should use:
AppearBalloon (CountryId).