I have a very simple program: list of links which prints a message when the
selected link is clicked. It works fine when I use AjaxLink or
StatelessLink, but I am having issues when I changed it to
StatelessAjaxFallbackLink (from wicketstuff-stateless package).  Instead of
printing that's selected, it prints the list of all the links when the FIRST
link is selected.  It works as expected for other links:

ListView links = new ListView("links", LIST) {

                        @Override
                        protected void populateItem(final ListItem item) {
                                final Label linkLabel = new Label("linkLabel", 
new
Model(item.getDefaultModelObjectAsString()));

                        
                                StatelessAjaxFallbackLink link = new 
StatelessAjaxFallbackLink("link") {

                                        @Override
                                        public void onClick(AjaxRequestTarget 
target) {
                                                System.out.println("selected: " 
+
linkLabel.getDefaultModelObjectAsString());
                                        }
                                };
                                item.add(link.add(linkLabel));
                        }
                };
                add(links);



myproject.gz
<http://apache-wicket.1842946.n4.nabble.com/file/t374889/myproject.gz>  

--
Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to