You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by godin <go...@essec.fr> on 2008/02/05 15:56:36 UTC
link to call another link in the same page ?
Hi,
i'am tring to create a link who delegate the call to another link
i've tried somthing like this:
linkAssignment = new AjaxLabelledLink("itemLinkProspect", null, menuAssignmentLabel) {
@Override
public void onClick(AjaxRequestTarget target) {
int selectedTab = ajaxTabbedPanel.getSelectedTab();
ITab tab = (ITab) ajaxTabbedPanel.getTabs().get(selectedTab);
ProspectFormPanel panel=(ProspectFormPanel) tab.getPanel("panel");
panel.addEvent.onClick(target);<--- call the other link in the same page
target.addComponent(ajaxTabbedPanel);
}
};
but i get an error :
WicketMessage: This component is not (yet) coupled to a page. It has to
be able to find the page it is supposed to operate in before you can
call this method (Component#getMarkupId)
Root cause:
org.apache.wicket.WicketRuntimeException: This component is not (yet)
coupled to a page. It has to be able to find the page it is supposed to
operate in before you can call this method (Component#getMarkupId) at
org.apache.wicket.Component.nextAutoIndex(Component.java:1380)
I'am sure i miss something in wicket
Thanks in advance
Marc
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org