How to use Managed Beans in XPages
The new free online course How to use Managed Beans in XPages is ready. It is an addition to our 4-day instructor-led XP852 – Lotus Domino Designer 8.5.2 Basic XPages Applications course.
Because it is necessary to have some Java knowledge there is also a link to the free online Java for XPages developers course. It is a course where you learn very quickly the basic concepts of Java.
The course begins by explaining the application that is used in the course, a simple employee management system. The application is kept simple so the student can concentrate on the concepts.
Two services are used in the application, the XPages service, and the Employee management service, which is split into two parts. The first is the Backing Managed Bean, holding the data submitted by the user as long as the XPages file is not reloaded. The course also shows how to bind the Employee bean properties with the Edit Box controls using Expression Language.
The second bean is the Model Managed Bean whose primary function is to store and retrieve employee data.
To become a Managed Bean the bean has to registered in the faces-config.xml file. Special is that you also learn how to pass the global variable database during initialization to the Model Managed bean.
The idea behind the application is that the data currently is stored in the Domino database. However this data source will be replaced in the future probably by a Web API service. To solution is to replace only the Model Managed Bean with another Java implementation.
The course closes with explaining how to use the Java debugger of Domino Designer.