function PPSinglesEditController(player1TextId, player2TextId, player1RadioId, player2RadioId, tournament) {
  if (player1TextId == null || player2TextId == null || player1RadioId == null || player2RadioId == null) {
    throw new Error("PPSinglesEditController missing required parameter.");
  }

  this.superclass(tournament);

  this.player1TextId = player1TextId;
  this.player2TextId = player2TextId;
  this.player1RadioId = player1RadioId;
  this.player2RadioId = player2RadioId;

  var self = this;
  // Bind to html elements when document is loaded.
  PPUtils.bind("load", window, function () {self.bind();} );
}

// This must be in between the constructor definition and
// new method definitions in order for it to work.
PPUtils.extend (PPSinglesEditController, PPEditController);

PPSinglesEditController.prototype.bind = function () {
  var self = this;
  PPUtils.bind("keyup", $(this.player1TextId), function () {self.updatePlayer1(self.player1TextId);} );
  PPUtils.bind("keyup", $(this.player2TextId), function () {self.updatePlayer2(self.player2TextId);} );
  PPUtils.bind("click", $(this.player1RadioId), function () {self.setMatchWinner();} );
  PPUtils.bind("click", $(this.player2RadioId), function () {self.setMatchWinner();} );
}


PPSinglesEditController.prototype.setMatchWinner = function() {
  var selectedMatch = this.getSelectedMatch();

  if ( $(this.player1RadioId).checked ) {
    selectedMatch.setWinner(PPMatch.Player1);
  } else {
    selectedMatch.setWinner(PPMatch.Player2);
  }

}
@@ -1510,8 +1510,1437 @@
 ;%0A  %7D%0A%0A%7D
+%0A%0APPSinglesEditController.prototype.disablePlayerTextFields = function (state)  %7B%0A       $(this.player1TextId).disabled = state;%0A       $(this.player2TextId).disabled = state;%0A%7D%0A%0APPSinglesEditController.prototype.disableWinnerRadioButtons = function (state) %7B%0A       $(this.player1RadioId).disabled = state;%0A       $(this.player2RadioId).disabled = state;%0A       // Clear the checked state as we disable...%0A       if ( state == true ) %7B%0A         $(this.player1RadioId).checked = false;%0A         $(this.player2RadioId).checked = false;%0A       %7D%0A%7D%0A%0APPSinglesEditController.prototype.setEditorValues = function (match) %7B%0A       if ( match == null ) %7B%0A         $(this.player1TextId).value = %22%22;%0A         $(this.player2TextId).value = %22%22;%0A       %7D else %7B%0A         $(this.player1TextId).value = match.getPlayer1Name();%0A         $(this.player2TextId).value = match.getPlayer2Name();%0A       %7D%0A%7D%0A%0APPSinglesEditController.prototype.setRadioValues = function (match) %7B%0A       if ( match == null) %7B%0A         return;%0A       %7D%0A%0A       if (match.completed()) %7B%0A         var winVal = match.winnerOrdinal();%0A         if ( winVal == PPMatch.Player1 ) %7B%0A            $(this.player1RadioId).checked = true;%0A         %7D%0A         if ( winVal == PPMatch.Player1 ) %7B%0A            $(this.player2RadioId).checked = true;%0A         %7D%0A       %7D else %7B%0A          $(this.player1RadioId).checked = false;%0A          $(this.player2RadioId).checked = false;%0A       %7D%0A%7D

implement abstract methods of superclass