In a saute pan, over medium heat, melt 2 tablespoons of butter. Add the onions. Season with salt and pepper. Saute until wilted, about 2 minutes. Season both sides of the liver with salt and pepper. Season the flour with salt and pepper. Dredge the liver in the flour, coating completely and shaking off the excess. In a large skillet, over medium heat, melt remaining 2 tablespoons of the butter. When the butter is hot, add the liver. Cook for 1 minute on each side, remove from the pan and set aside.
To serve, place a serving of the gratin in the center of each plate. Lay a piece of the liver next to the gratin. Spoon the onions over the liver. Garnish with parsley.
Preheat the oven to 400 degrees F.
In a mixing bowl, whisk the cream and yolks together. Whisk well. Season with salt and pepper. Butter a square-baking dish.
Lay a layer of the potatoes over the bottom of the pan. Season the layer with salt and pepper. Sprinkle with an eighth of the cheese. Ladle 1 cup of the cream mixture over the cheese. Lay another layer of the potatoes over the cream mixture. Using your hands, firmly press the layers together. Repeat the above process with the remaining ingredients.
Place a piece of parchment paper over the potatoes and cover with foil. Place in the oven and cook for 30 minutes. Remove the foil and continue to cook for 15 minutes. Remove from the oven and cool completely. Reheat and slice into individual servings.