PackageResourceReference and PackageResource, then added an Application
parameter to each to make that explicit. Added IComponentInitializer
method
that is called in Application constructor for each class listed in
META-INF/wicket-component-initializers.txt. This will allow component
developers to initialize resources when the app starts up. For
applications, you can also create a
META-INF/[ApplicationName]-wicket-component-initializers.txt if you
want to
preload resources or otherwise initialize for pages. Made changes to
ImagesApplication to demo this, including an example that preloads the
cancel button via
META-INF/ImagesApplication-wicket-component-initializers.txt
these names are incorrect, first it is a IInitializer (not a
IComponentInitializer) and
it is always wicket.properties and they are in the root src folder of a
jar or dir.
they can contain this:
initializer=wicket.Initializer
will always be called for every application or
ImagesApplication-initializer=wicket.examples.images.Initializer
an initializer only used for the imagesapplication.
I saw it was explained correctly below..
Some other changes
o 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.
-------------------------------------------------------
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-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user