How to create submenus with dynamic content?
You can make each submenu have its own context by setting a variable in the UILayout.

The script can be made to work as expected with only minor changes.


Define a context member for each menu, using UILayout.context_pointer_set
In the menus draw function, access this variable directly.


Modified example script:

import bpy

class CamerasSubMenu(bpy.types.Menu):
    bl_label = "Camera Properties"
    bl_idname = "view3d.camera_properties_menu"

    # &lt;-- Line removed (menu's don't store properties)

    def draw(self, context):
        layout = self.layout

        row = layout.row()
        row.prop(context.my_camera, "lens")  # &lt;-- Changed from original


class CamerasMenu(bpy.types.Menu):
    bl_label = "Cameras"
    bl_idname = "view3d.cameras_menu"

    def draw(self, context):
        layout = self.layout

        for camera in bpy.data.cameras:

            row = layout.row()

            row.context_pointer_set("my_camera", camera)  # &lt;-- Added to original
            row.menu(CamerasSubMenu.bl_idname, text=camera.name)
            # &lt;-- Line removed (camera set above)

def register():
    bpy.utils.register_module(__name__)    


def unregister():
    bpy.utils.unregister_module(__name__)  

if __name__ == "__main__":
    register()


bpy.ops.wm.call_menu(name=CamerasMenu.bl_idname)