Error Messages

The final element to add to the logon framework is the ability to present error messages to the user. This is managed by the error-text and error-scrollbox variables as defined in the code listing for the Logon.{create-logon-controls} method in Figure 3-13.

We do not know how large the error message created might be, as it depends on the data returned in the logon XML message. Therefore, to handle an unknown text size, we use the system Curl class ScrollBox. An issue when working with a ScrollBox is that you cannot change its text once it has been instantiated. The ScrollBox would not work in our framework, as we might need to display a different error message each time the user clicks the Login button. To get around this problem, ...

Get Enterprise Curl now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.