On Wed, Dec 8, 2010 at 1:39 PM, Peter Karich <[email protected]> wrote: > the MyFooListener needs to be implemented somewhere in HomePage, right?
If you do it as an anonymous inner class. > Or do you mean that I will have a separate class for each listener passing > in the necessary references ala: > fp.addOnClickListener(new MyFooListener(homePageRef)); > ? (to use homePageRef.doSearch within the listener) If you want to reduce the total lines of code in the HomePage by going with the "listenery" approach, you will create these listeners as concrete classes. Your homepage will use them. Perhaps other pages will use them as well (if they are well-encapsulated and have some reusable logic in them) -- Jeremy Thomerson http://wickettraining.com Need a CMS for Wicket? Use Brix! http://brixcms.org --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
