Sample Implementation

Listing 10.23 contains the controller code for the utilization Visualforce page, and Listing 10.24 contains the page itself. This implementation brings together the three elements discussed in this section: the user interface to calculate utilization, the utilization computation itself, and the Web service callout.

Listing 10.23 Sample Code for Utilization Controller

public class UtilizationController {  public Timecard__c card1 { get; private set; }  public Timecard__c card2 { get; private set; }  public Boolean shared { get; set; }  public Decimal utilization { get; private set; }  public Decimal totalHours { get; private set; }  public Integer totalResources { get; private set; }  public ...

Get Development with the Force.com Platform: Building Business Applications in the Cloud, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.