Impossible to debug without *all* your markup from your listitem. You
left the link markup out!
Martijn
On Thu, Mar 26, 2009 at 6:24 PM, Seven Corners wrote:
>
> 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:
>
> ...
>
>
>
> ...
>
>
> and the code is like this:
>
> private class SNMPTrapEventSubscriptionView extends
> RefreshingView
> {
> ...
> �...@override
> protected void populateItem( Item
> 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>, 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
>
>
--
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.5 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org