You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tiles.apache.org by stanlick <st...@gmail.com> on 2008/11/14 17:39:59 UTC

Tiles 2.1 Wildcard

Antonio -- 

Hopefully this is the place you would like to see my posts!  Alright,
localePatternPaths={}.  So what did I miss on initialization?

Scott



This might be the problem. Can you see ifthe localePatternPaths map is
filled or not?
Because if it is filled then it is a problem of evaluation, otherwise
a problem of initialization.

Antonio 
-- 
View this message in context: http://www.nabble.com/Tiles-2.1-Wildcard-tp20504024p20504024.html
Sent from the tiles dev mailing list archive at Nabble.com.


Re: Tiles 2.1 Wildcard

Posted by Antonio <an...@gmail.com>.
2008/11/14 Antonio <an...@gmail.com>:
> (in other words, it does not call super.storeDependencies).

Sorry, I meant "storeContainerDependencies".

Antonio

Re: Tiles 2.1 Wildcard

Posted by Antonio <an...@gmail.com>.
2008/11/14  <st...@gmail.com>:
> Cool!  I have no desire to go back to Tiles 2.0, so what changes need to be
> made to the S2 plug-in to get the 2.1 chicken-richness?  It is creating a
> new StrutsTilesContextFactory(contextFactory) now, which is a
> StrutsTilesContainerFactory nested class definition.  I'm not sure about the
> dependencies, but with a little guidance I'd be happy to help with the
> coding.  I love the features in 2.1 and would really like to see it plugged
> in to Struts/2

Struts2/Tiles2 plugin has 3 almost useless wrappers for Tiles 2.1
* StrutsTilesContainerFactory: extends TilesContainerFactory to create
a StrutsTilesContextFactory
* StrutsTilesContextFactory: implements TilesContextFactory (now
deprecated, better use TilesRequestContextFactory) to create
StrutsTilesRequestContext
* StrutsTilesRequestContext: wraps a TilesRequestContext to add
support for FreeMarker result type under Tiles.

All this stuff could be removed with the use of the renderer concept:
http://tiles.apache.org/framework/tutorial/advanced/attribute-rendering.html
There could be a "Struts 2 result renderer" that is able to render an
action result, whatever type it is. This renderer will be configured
and used in Tiles definition files, specifying the correct "type".
This renderer will make useless the classes mentioned above (probably
with the exception of the default configuration parameters).

Thanks
Antonio

Re: Tiles 2.1 Wildcard

Posted by st...@gmail.com.
Cool!  I have no desire to go back to Tiles 2.0, so what changes need to be
made to the S2 plug-in to get the 2.1 chicken-richness?  It is creating a
new StrutsTilesContextFactory(contextFactory) now, which is a
StrutsTilesContainerFactory nested class definition.  I'm not sure about the
dependencies, but with a little guidance I'd be happy to help with the
coding.  I love the features in 2.1 and would really like to see it plugged
in to Struts/2

Peace,
Scott

On Fri, Nov 14, 2008 at 11:02 AM, Antonio <an...@gmail.com>wrote:

> 2008/11/14 stanlick <st...@gmail.com>:
> >
> > Antonio --
> >
> > Hopefully this is the place you would like to see my posts!  Alright,
>
> Yes it is :-)
>
> > localePatternPaths={}.  So what did I miss on initialization?
>
> Now that I remember, the StrutsTilesContainer does an initialization
> that does not take care of the code contained in TilesContainerFactory
> (in other words, it does not call super.storeDependencies).
> The DAO initialization is done in
> TilesContainerFactory.storeDependencies, so it is not called using the
> Struts plugin.
> It works with Tiles 2.0, but it is *ugly*: this was the reason because
> I refactored Tiles code to be as much modular as possible.
>
> Antonio
>

Re: Tiles 2.1 Wildcard

Posted by Antonio <an...@gmail.com>.
2008/11/14 stanlick <st...@gmail.com>:
>
> Antonio --
>
> Hopefully this is the place you would like to see my posts!  Alright,

Yes it is :-)

> localePatternPaths={}.  So what did I miss on initialization?

Now that I remember, the StrutsTilesContainer does an initialization
that does not take care of the code contained in TilesContainerFactory
(in other words, it does not call super.storeDependencies).
The DAO initialization is done in
TilesContainerFactory.storeDependencies, so it is not called using the
Struts plugin.
It works with Tiles 2.0, but it is *ugly*: this was the reason because
I refactored Tiles code to be as much modular as possible.

Antonio