Put oven rack in middle position and preheat oven to 450°F. Oil a 13- by 9-inch baking pan.

After peeling onions, trim root ends, leaving onions whole, then quarter onions lengthwise. Put onions in baking pan, then drizzle with oil and vinegar, tossing to coat. Arrange onions with a cut side down and sprinkle with salt and pepper.

Roast, uncovered, turning over once and basting with pan juices twice during baking, until deep golden, about 30 minutes. Add water to pan and roast until onions are tender and caramelized, about 20 minutes more. Transfer onions with pan juices to a large bowl.

While onions are roasting, cook beans in a 5- to 6-quart pot of boiling salted water , uncovered, until crisp-tender, about 5 minutes. Drain beans in a colander, then add to onions and toss. Season with salt and pepper.