// Create a context for the layout and push it onto the page context.
DeviceLayoutContext deviceLayoutContext = new DeviceLayoutContext();
deviceLayoutContext.setMarinerPageContext(pageContext);
deviceLayoutContext.setDeviceLayout(anonymousLayout);
deviceLayoutContext.initialise();
pageContext.pushDeviceLayoutContext(deviceLayoutContext);
// Get an instance of the layout's region.
Region region = (Region) anonymousLayout.getRootFormat();
RegionInstance anonymousRegionInstance = (RegionInstance)