Re: T5: alternative template location

2010-12-01 Thread Thiago H. de Paula Figueiredo
On Wed, 01 Dec 2010 02:56:19 -0200, Angelo C. angelochen...@gmail.com  
wrote:



Hi,


Hi!

Is there a way to let T5 look at an alternative location for templates,  
if not found, it goes to the default location? example: Home.tml is  
always in WEB-INF,  there might be a customized version of Home.tml in:

plugIns/WEB-INF. possible?


What's the use case here?

If you're thinking about easy editing, why not putting the templates in  
the classpath and running an exploded WAR so it can be edited live when  
needed?


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: T5: alternative template location

2010-12-01 Thread Angelo C.

example: if you have a packaged blog system, user can customize it by editing
those tml files, but when a new version is out, those 'in place' editing
will be replaced, if user copies those tml file into a new directory, say
'plugins', then they will be preserved.



Thiago H. de Paula Figueiredo wrote:
 
 On Wed, 01 Dec 2010 02:56:19 -0200, Angelo C. angelochen...@gmail.com  
 wrote:
 
 Hi,
 
 What's the use case here?
 
 
 
 

-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-alternative-template-location-tp3287207p3287564.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: T5: alternative template location

2010-12-01 Thread Thiago H. de Paula Figueiredo
On Wed, 01 Dec 2010 10:08:41 -0200, Angelo C. angelochen...@gmail.com  
wrote:


example: if you have a packaged blog system, user can customize it by  
editing those tml files, but when a new version is out, those 'in place'  
editing

will be replaced, if user copies those tml file into a new directory, say
'plugins', then they will be preserved.


You can subclass the pages, use this customized template as the subclass  
one and use URL rewriting to do that. No need for new template locations.


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: T5: alternative template location

2010-12-01 Thread Igor Drobiazko
You can contribute your own ComponentTemplateLocator. Read this article:

http://blog.tapestry5.de/index.php/2010/08/06/extending-template-lookup-mechanism/



On Wed, Dec 1, 2010 at 5:56 AM, Angelo C. angelochen...@gmail.com wrote:


 Hi,

 Is there a way to let T5 look at an alternative location for templates, if
 not found, it goes to the default location? example: Home.tml is always in
 WEB-INF,  there might be a customized version of Home.tml in:
 plugIns/WEB-INF. possible?

 Angelo
 --
 View this message in context:
 http://tapestry.1045711.n5.nabble.com/T5-alternative-template-location-tp3287207p3287207.html
 Sent from the Tapestry - User mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org




-- 
Best regards,

Igor Drobiazko
http://tapestry5.de


T5: alternative template location

2010-11-30 Thread Angelo C.

Hi,

Is there a way to let T5 look at an alternative location for templates, if
not found, it goes to the default location? example: Home.tml is always in
WEB-INF,  there might be a customized version of Home.tml in:
plugIns/WEB-INF. possible?

Angelo
-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-alternative-template-location-tp3287207p3287207.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



T5: alternative template

2009-03-04 Thread Angelo Chen

Hi,

I know T5 always team up template with java class using the same name, say,
MyCars.java, then you need a MyCars.tml, is it possible we can have
MyCarsAqua.tml, MyCarsClassic,tml, and we can programatically chose which
tml to be rendered at runtime? this will bring a degree of configurability
to the app, what do you think?

Angelo
-- 
View this message in context: 
http://www.nabble.com/T5%3A-alternative-template-tp22343366p22343366.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: T5: alternative template

2009-03-04 Thread Thiago H. de Paula Figueiredo
Em Wed, 04 Mar 2009 22:17:07 -0300, Angelo Chen  
angelochen...@yahoo.com.hk escreveu:



Hi,


Hi!

I know T5 always team up template with java class using the same name,  
say, MyCars.java, then you need a MyCars.tml, is it possible we can have

MyCarsAqua.tml, MyCarsClassic,tml, and we can programatically chose which
tml to be rendered at runtime?


What exactly changes from one version to another?
By the way, you can @InjectPage the other version, choose programatically  
the one you want and redirect to the chosen one by returning it in  
onActivate().


this will bring a degree of configurability to the app, what do you  
think?


I don't think it is a good idea. This would break something I love: the  
1:1 relationship between page class and template and Tapestry.


--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: T5: alternative template

2009-03-04 Thread Angelo Chen

Hi Thiago,

Thanks, Inject page is an option, it will look like this:

localhost/mycars
localhost/mycarsaqua

is there a way that, even I inject MyCarAqua, its url still
localhost/mycars?






Thiago H. de Paula Figueiredo wrote:
 
 Em Wed, 04 Mar 2009 22:17:07 -0300, Angelo Chen  
 angelochen...@yahoo.com.hk escreveu:
 
 Hi,
 
 Hi!
 
 I know T5 always team up template with java class using the same name,  
 say, MyCars.java, then you need a MyCars.tml, is it possible we can have
 MyCarsAqua.tml, MyCarsClassic,tml, and we can programatically chose which
 tml to be rendered at runtime?
 
 What exactly changes from one version to another?
 By the way, you can @InjectPage the other version, choose programatically  
 the one you want and redirect to the chosen one by returning it in  
 onActivate().
 
 this will bring a degree of configurability to the app, what do you  
 think?
 
 I don't think it is a good idea. This would break something I love: the  
 1:1 relationship between page class and template and Tapestry.
 
 -- 
 Thiago H. de Paula Figueiredo
 Independent Java consultant, developer, and instructor
 http://www.arsmachina.com.br/thiago
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org
 
 
 

-- 
View this message in context: 
http://www.nabble.com/T5%3A-alternative-template-tp22343366p22344065.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: T5: alternative template

2009-03-04 Thread Thiago H. de Paula Figueiredo
Em Wed, 04 Mar 2009 23:23:14 -0300, Angelo Chen  
angelochen...@yahoo.com.hk escreveu:



Hi Thiago,


Hi!



Thanks, Inject page is an option, it will look like this:
localhost/mycars
localhost/mycarsaqua


You're right . . .


is there a way that, even I inject MyCarAqua, its url still
localhost/mycars?


I've never actually tried it, but I would create a block (or component) in  
each alternate page, create a getter that returns this block, inject the  
alternate pages in MyCars and use the Delegate component to render the  
block. This is similar to how BeanEditFrom/BeanEditor works: it renders  
components and blocks that are located in other pages.


--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org