src/main/java/org/efaps/ui/wicket/components/menu/LinkItem.java
@Override
    public void onClick()
    {
        ((EFapsSession) getSession()).addRecent(this);
        final UIMenuItem model = super.getModelObject();
        try {
            final AbstractCommand command = model.getCommand();
            final PagePosition pagePosition = isPopup() ? PagePosition.POPUP : PagePosition.CONTENT;

            if (command.getTargetTable() != null) {
                final WebPage page;
                if (command.getTargetStructurBrowserField() != null) {
                    if ("GridX".equals(Configuration.getAttribute(ConfigAttribute.STRUCBRWSR_DEFAULTTYPECONTENT))) {
                        page = new GridPage(Model.of(UIGrid.get(command.getUUID(), pagePosition)));
                    } else {
                        final UIStructurBrowser uiStrBrws = new UIStructurBrowser(model.getCommandUUID(),
                                    model.getInstanceKey()).setPagePosition(pagePosition);
                        page = new StructurBrowserPage(Model.of(uiStrBrws), getPage().getPageReference());
                    }
                } else {
                    if ("GridX".equals(Configuration.getAttribute(ConfigAttribute.TABLE_DEFAULTTYPECONTENT))) {
                        page = new GridPage(Model.of(UIGrid.get(command.getUUID(), pagePosition)));
                    } else {
                        final UITable uiTable = new UITable(model.getCommandUUID(), model.getInstanceKey())
                                        .setPagePosition(pagePosition);
                        page = new TablePage(Model.of(uiTable), null, getPage().getPageReference());
                    }
                }
                setResponsePage(page);
            } else if (command.getTargetForm() != null || command.getTargetSearch() != null) {
                final UIForm uiForm = new UIForm(model.getCommandUUID(), model.getInstanceKey()).setPagePosition(
                                pagePosition);
                final FormPage page = new FormPage(Model.of(uiForm), getPage().getPageReference());
                setResponsePage(page);
            } else {
                try {
                    final List<Return> rets = model.executeEvents(ParameterValues.OTHERS, this);
                    if (command.isTargetShowFile()) {
                        final Object object = rets.get(0).get(ReturnValues.VALUES);
                        if (object instanceof File) {
                            getRequestCycle().scheduleRequestHandlerAfterCurrent(new RedirectRequestHandler(
                                            "/usage.html"));
                        }
                    }
                } catch (final EFapsException e) {
                    throw new RestartResponseException(new ErrorPage(e));
                }
            }
        } catch (final EFapsException e) {
            setResponsePage(new ErrorPage(e));
        }
    }
@Override
    public void onClick()
    {
        ((EFapsSession) getSession()).addRecent(this);
        final UIMenuItem model = super.getModelObject();
        try {
            final AbstractCommand command = model.getCommand();
            final PagePosition pagePosition = isPopup() ? PagePosition.POPUP : PagePosition.CONTENT;

            if (command.getTargetTable() != null) {
                final WebPage page;
                if (command.getTargetStructurBrowserField() != null) {
                    if ("GridX".equals(Configuration.getAttribute(ConfigAttribute.STRUCBRWSR_DEFAULTTYPECONTENT))) {
                        page = new GridPage(Model.of(UIGrid.get(command.getUUID(), pagePosition)));
                    } else {
                        final UIStructurBrowser uiStrBrws = new UIStructurBrowser(model.getCommandUUID(),
                                    model.getInstanceKey()).setPagePosition(pagePosition);
                        page = new StructurBrowserPage(Model.of(uiStrBrws), getPage().getPageReference());
                    }
                } else {
                    if ("GridX".equals(Configuration.getAttribute(ConfigAttribute.TABLE_DEFAULTTYPECONTENT))) {
                        page = new GridPage(Model.of(UIGrid.get(command.getUUID(), pagePosition)));
                    } else {
                        final UITable uiTable = new UITable(model.getCommandUUID(), model.getInstanceKey())
                                        .setPagePosition(pagePosition);
                        page = new TablePage(Model.of(uiTable), null, getPage().getPageReference());
                    }
                }
                setResponsePage(page);
            } else if (command.getTargetForm() != null || command.getTargetSearch() != null) {
                final UIForm uiForm = new UIForm(model.getCommandUUID(), model.getInstanceKey()).setPagePosition(
                                pagePosition);
                final FormPage page = new FormPage(Model.of(uiForm), getPage().getPageReference());
                setResponsePage(page);
            } else {
                try {
                    final List<Return> rets = model.executeEvents(ParameterValues.OTHERS, this);
                    if (command.isTargetShowFile()) {
                        final Object object = rets.get(0).get(ReturnValues.VALUES);
                        if (object instanceof File) {
                            getRequestCycle().scheduleRequestHandlerAfterCurrent(new RedirectRequestHandler(
                                            "/usage.html"));
                        }
                    }
                } catch (final EFapsException e) {
                    throw new RestartResponseException(new ErrorPage(e));
                }
            }
        } catch (final EFapsException e) {
            setResponsePage(new ErrorPage(e));
        }
    }
On click it is evaluated what must be responded.