yeah, this is WAY better.

Igor Vaynberg wrote:

sexy
-Igor

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jonathan Locke
Sent: Thursday, August 11, 2005 4:24 PM
To: [email protected]
Subject: Re: [Wicket-develop] feedback refactor and paging navigation


okay.  implemented, tested, checked in.  checkin comment:

Refactored intializer code. Now wicket.properties is checked for each jar or root folder on the classpath. If it contains either initializer=[class] or [app-name]-initializer=[class], that class is instantiated and the IInitializer.init(Application) method is called on the resulting object. So, both libraries and applications can easily initialize their resources now.
 For example, the core wicket.properties file contains just this:
"initializer=wicket.Initializer", which invokes the wicket.Initializer class with the application being loaded. The wicket.Initializer.init() method
 will contain a sequence of initializations.  For example,
"new TreeComponentInitializer().init(application)". This is a much better and safer and more Java way of initializing components for a library like core.
 Updated the images example to show how this is done.

Here's the highlights:

   public interface IInitializer
   {
       public void init(Application application);
   }

wicket.properties:

   initializer=wicket.Initializer

   public class wicket.Initializer implements IInitializer
   {
       public void init(Application application)
       {
           new TreeComponentInitializer().init(application);
             ...
       }
   }

and for images example application:

wicket.properties:

   ImagesApplication-initializer=wicket.examples.images.Initializer

public class wicket.examples.images.Initializer implements IInitializer
   {
       public void init(Application application)
       {
           application.getSharedResources().add("cancelButton",
                   new DefaultButtonImageResource("Cancel"));
       }
   }

good?





-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-develop



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-develop

Reply via email to