tiles-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vibhore Anant <vibhore_an...@yahoo.com>
Subject Re: Support for reloading/refreshing Tile Definitions
Date Mon, 04 May 2009 21:34:26 GMT
Hi Antonio,
 
It turns out that the tutorial has a mistake (infact 2 mistakes).  The method signatures
to provide in one's own custom implementation of the AbstractTilesContainerFactory are incorrectly
printed.  The correct signatures are:
 
protected LocaleDefinitionsFactory instantiateDefinitionsFactory(TilesApplicationContext applicationContext,
TilesRequestContextFactory contextFactory,
LocaleResolver resolver)
 
and
 
protected DefinitionDAO<Locale> createLocaleDefinitionDao(TilesApplicationContext applicationContext,
TilesRequestContextFactory contextFactory,
LocaleResolver resolver)
 
In the tutorial, there is an extra first parameter for passing in an Object.  Changing
the signatures allows me to load the definitions from the database (I can see the definitions
being retrieved).  My next step will be to create Definition objects out of the data (like
I did with the DatabaseDefinitionsReader).  And then, I can test if I can refresh/reload
the definitions.  I might come back for some help when I get to the final stage...
 
I hope you can fix the tutorial so others dont trip up at the same point I did.  Thanks a
lot for your prompt replies Antonio.
 
Regards
Vibhore

--- On Mon, 5/4/09, Antonio Petrelli <antonio.petrelli@gmail.com> wrote:


From: Antonio Petrelli <antonio.petrelli@gmail.com>
Subject: Re: Support for reloading/refreshing Tile Definitions
To: users@tiles.apache.org
Date: Monday, May 4, 2009, 9:37 PM


2009/5/4 Vibhore Anant <vibhore_anant@yahoo.com>:
> if the code in my custom TilesContainerFactory gets executed correctly, the LocaleDefinitionsFactory
will be created automatically, right?
>
> protected LocaleDefinitionsFactory instantiateDefinitionsFactory(
> Object context, TilesApplicationContext applicationContext,
> TilesRequestContextFactory contextFactory, LocaleResolver resolver) {
> return new LocaleDefinitionsFactory();
> }

I think so, but probably it is overridden by the code in
TilesContainerFactory.postCreationOperations.
I think you have no choice other than debugging.

Antonio



      
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message