Dynamic OptionDialog for popup menu