Here we go ... 


//... from code ... 
AjaxFallbackLink link1  = new AjaxFallbackLink<T>("article-link-1", new
Model<T>((T)this.getDefaultModelObject())) {
                        
                        private static final long serialVersionUID = 
8011531891135888415L;
                        
                        @Override
                        public void onClick(final AjaxRequestTarget theTarget) {
                                LOG.info("LINK 1 clicked");
                        }
                        
                };
                
                SimpleAttributeModifier sam     = new 
SimpleAttributeModifier("onclick",
"stopEvent(window.event);") {
                        
                        public void onComponentTag(final Component 
theComponent, final
ComponentTag theTag) {
                                String onClick  = "stopEvent(window.event);" +
theTag.getAttribute("onclick");
                                theTag.put("onclick", onClick);
                        }
                };
                link1.add(sam);




//javascript function
function stopEvent(e) {
        if (!e) e = window.event;
        if (e.stopPropagation) {
                e.stopPropagation();
        } else {
                e.cancelBubble = true;
        }
}

(tried it on IE7 - IE8 and firefox (linux) and chrome (for linux)

regards

Armando
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Nesting-Links-tp1885368p3248475.html
Sent from the Users forum 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

Reply via email to