I have link that is not receiving an onclick event. It links to a page in my application, and I do not want it bookmarkable. It's in a RefreshingView. The browser renders the link with the correct style for a link, but if you hover over the link, you don't get the URL to show up in the status bar. So something is very whacked.
The HTML looks like this: ... <table> <tr wicket:id="snmpSubscription"> <td wicket:id="trapIdCell"> </td> ... and the code is like this: private class SNMPTrapEventSubscriptionView extends RefreshingView<SNMPTrapEventSubscriptionBean> { ... @Override protected void populateItem( Item<SNMPTrapEventSubscriptionBean> item ) { final SNMPTrapEventSubscriptionBean bean = item.getModelObject(); WebMarkupContainer cell = new WebMarkupContainer( "trapIdCell" ); Link snmpLink = new Link( "snmpLink" ) { private static final long serialVersionUID = 1L; @Override public void onClick() { --> we never get try here { PageParameters params = new PageParameters(); params.add( SettingsPage.kbMANAGE_SNMP, Boolean.toString( true ) ); params.add( SettingsPage.kiSUBSCRIPTION_ID, Integer.toString( bean.getId() ) ); EventSubscriptionsPanel.this.setResponsePage( SettingsPage.class, params ); } catch( Throwable t ) { logger.error( t.getMessage(), t ); } } }; snmpLink.add( new Label( "id" ) ); cell.add( snmpLink ); item.add( cell ); ... Place a breakpoint in the onClick() handler and we never get there. In the browser, the anchor text shows up blue, indicating that the browser knows it's a link, but you click on it and nothing happens. In the HTML output, this is the link's href: href="?wicket:interface=:4:rightHandContentPanel:tabs:panel:tableWrapper:snmpSubscription:3:trapIdCell:snmpLink::ILinkListener::" It doesn't look like the href has the right class but I don't know. The model is a CompoundPropertyModel of my SNMPTrapEventSubscriptionBean bean; I had a provider that's a LoadableDetachableModel<List<SNMPTrapEventSubscriptionBean>>, and I load a list of data from the server. I am getting accurate data; it's the link that isn't working. Anyone have a clue what I'm doing wrong? Thanks in advance. -- View this message in context: http://www.nabble.com/Link-not-getting-onclick-event-tp22725492p22725492.html Sent from the Wicket - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org