Combine the sugar and water in a small pot over medium-low heat. Cook until sugar begins to dissolve.
Add the poppy seeds, and stir to mix well.
Stir in the zest, juices, vanilla, and sherry. Stir well using a wooden spoon. Stir in the egg, and once well mixed, stir in the butter. Cook, stirring constantly, until the butter is completely melted, and the mixture becomes slightly thickened, about 2 minutes.
Transfer the mixture to a bowl, and chill until cooled, and further thickened. At least 30 minutes. You can also prepare the filling a few days in advance, and keep in the fridge until ready to use.