code: private CharSequence getEventJs(final UIMenuItem _menuItem)
      {
          final String key = RandomUtil.randomAlphabetic(8);
          this.menuItems.put(key, _menuItem);
          final StringBuilder ret = new StringBuilder();
          switch (_menuItem.getTarget()) {
              case HIDDEN:
                  ret.append(getBehavior(ExecBehavior.class).getCallbackFunctionBody(CallbackParameter.converted("m",
                                  "\"" + key + "\"")));
                  break;
              case MODAL:
                  ret.append(getBehavior(OpenModalBehavior.class).getCallbackFunctionBody(CallbackParameter.converted("m",
                                  "\"" + key + "\"")));
                  break;
              case POPUP:
                  final PageParameters popupPageParameters = new PageParameters();
                  popupPageParameters.add("m", key);
                  final PopupSettings popupSettings = new PopupSettings();
                  popupSettings.setHeight(_menuItem.getWindowHeight());
                  popupSettings.setWidth(_menuItem.getWindowWidth());
                  popupSettings.setTarget("'" + urlForListener(popupPageParameters) + "'");
                  popupSettings.setWindowName("eFapsPopup");
                  ret.append("(function () {").append(popupSettings.getPopupJavaScript()).append("}) ();");
                  break;
              default:
                  final PageParameters pageParameters = new PageParameters();
                  pageParameters.add("m", key);
                  ret.append("registry.byId(\"").append("mainPanel").append(
                                  "\").set(\"content\", domConstruct.create(\"iframe\", {").append("\"id\": \"")
                          .append(MainPage.IFRAME_ID).append("\",\"src\": \"").append(urlForListener(pageParameters))
                          .append("\",\"style\": \"border: 0; width: 100%; height: 99%\"").append(",\"id\": \"")
                          .append(MainPage.IFRAME_ID).append("\"").append("}));");
                  break;
          }
          return ret;
      }
docs: Gets the url.
  
  @param _menuItem the menu item
  @return the url