Heat the oil in a 24–25 cm (9½–10 inch) sturdy frying pan. Add the onion and potatoes and sprinkle with salt. Gently fry on the lowest setting for about 15–20 minutes, turning frequently, until softened. If a lot of oil is left in the pan once the potatoes are softened, drain it off, but leave a little to finish cooking.
Beat the eggs in a bowl with the green peppercorns and a little extra salt.
Toss the cheese and beans with the potato mixture until evenly combined. Spread the mixture in a thin layer and pour the eggs over the top. Reduce the heat to its lowest setting and cook gently for 10–15 minutes until almost set. Finish by cooking under a preheated moderate grill for 5 minutes until lightly browned. Serve warm or cold with a mixed salad.