Not sure how you are losing a session scope variable in the transition. Once a value has been set to a session scope variable then it is set until the browser session ends or the value is reset by user interaction or code.
The dialog box button does not have to be a submit button, it just needs to close the dialog box.
Change the button type from "submit" to "button" and change the event handler.