You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Igor Vaynberg (JIRA)" <ji...@apache.org> on 2010/09/14 18:13:34 UTC

[jira] Resolved: (WICKET-3047) Unscheduled onClick

     [ https://issues.apache.org/jira/browse/WICKET-3047?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg resolved WICKET-3047.
-----------------------------------

    Resolution: Incomplete

please provide a *quickstart* project. no one has time to replicate all the spring infrastructure, etc.

if you dont know what quickstart is please see our website.

reopen when you have attached the quickstart.

> Unscheduled onClick
> -------------------
>
>                 Key: WICKET-3047
>                 URL: https://issues.apache.org/jira/browse/WICKET-3047
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.10
>            Reporter: Itun
>
> public final class NewsListPanel extends Panel { 
>     @SpringBean 
>     NewsService service; 
>     private List<News> NewsList; 
>     private PageableListView PAListView; 
>     public PageableListView getPAListView() { 
>         return PAListView; 
>     } 
>     public NewsListPanel(String id, List<News> NewsList) { 
>         super(id); 
>         this.NewsList = NewsList; 
>         PAListView = new PageableListView("NewsList", NewsList, 5) { 
>             @Override 
>             protected void populateItem(ListItem item) { 
>                 News news = (News) item.getModelObject(); 
>                 item.add(new ActionLink("Delete", news) { 
>                     @Override 
>                     public void onClick() { 
>                         service.deleteNews(news); 
>                         setResponsePage(new NewsPage()); 
>                     } 
>                 }); 
>                 item.add(new Label("Time", DateUtils.timeFormatted(news.getTimestamp()))); 
>                 item.add(new Label("Title", news.getTitle())); 
>                 item.add(new Label("Content", news.getContent()).setEscapeModelStrings(false)); 
>             } 
>         }; 
>         add(PAListView); 
>     } 
>     private class ActionLink extends Link { 
>         News news; 
>         public ActionLink(String id, News news) { 
>             super(id); 
>             this.news = news; 
>         } 
>         @Override 
>         public void onClick() { 
>             throw new UnsupportedOperationException("Not supported yet."); 
>         } 
>     } 
> } 
> In this code, when there is an onClick processing, everything is going well. But when NewsPage(this panel is here) is generated after onClick event, suddenly Unscheduled onClick has appeared with News object which never existed.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.