The white former boyfriend of black Olympic triple-jumper Ashia Hansen staged a race-hate attack on himself before trying to sell the story of the bogus assault to the media, a court was told today.