The next step would be to actually submit the request. There are actually two different things that we want to happen when a user submits the request. The first is that, we will assume that the request will be approved and go ahead and add the time off to your calendar as a new event. Second, we will need to compose and send the e-mail request. This second part we will cover in more detail later. For now, let's stay focused on the PIM data and add an event.
Working with the calendar is very similar to working with contacts. Items in the calendar are generically called events and are also included in the umbrella of PIM items. As a result, the process begins with the PIM class once again. The similarity continues with the Java standard Event
class and the BlackBerry-specific BlackBerryEvent
class.
With that understanding, let's get started looking at some code.