2008/6/21 Jeromy Evans <[EMAIL PROTECTED]>:
> Is there any interest in a Tiles Convention?

Well it could be nice :-)

> The problem I'm trying to solve is that with ajax html results (page
> fragments) a TilesResult can easily:
>  - substitute a Tile based on the theme; and/or
>  - substitute a Tile based on the locale; and
>  - embed Tiles within another page without concern for the location and
> theme/locale (much better IMHO than s:include, jsp:include, ftl:include)

I don't know how it can be useful, but Tiles can be customized by
locale, by appending i18n codes (e.g. "_en_US") in the name of the
file. The locale is resolved by using a "LocaleResolver" instance,
that can be easily implemented.

>  2. if the Tiles plugin is installed, the convention's search is extended(?)
> to search for a Tile matching "package.action.result" (not sure how yet...)

I think that this solution is the best.
About the "how", you can use the TilesContainer:
http://tiles.apache.org/tutorial/advanced/runtime.html
(search for "Runtime Composition using APIs").


>  3.Change TilesResult to accept variables in the tiles name
> @Result(name="show", type=TilesResult.class, value="tiles.{action}.show")
> (which doesn't reduce code, but starts a useful convention)

It could be useful, though. I think 2 and 3 could be implemented both.

> I get the impression that few users use TilesResult though (but do use Tiles
> within JSPs).

I don't think so, I read some people asking for support in
Struts-Users and Tiles-Users about it.

Anyway count on me :-) I don't know much about Struts 2, but I can
help in writing code to call Tiles correctly.

Ciao
Antonio

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to