You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Jérôme BERNARD <je...@gmail.com> on 2005/05/27 11:24:43 UTC

Templates (re)loading...

Hi,

I have a client that basically wants to be able to change the layout
of the pages generated by Tapestry.

He is usually working with DreamWeaver using the templating feature so
that he can easily change all his static pages.

He would like to be able to use those DW templates with Tapestry
pages. This could be quite easy: DW would generate the templates used
by Tapestry (for DW it would be regular files generated by its own
template). But the thing is, my client may change quite frequently the
templates (about once a week), so I need to find a way to reload the
templates "on demand" and potentially to have the templates "out of
the webapp" so that my client can FTP them (otherwise, I'll try to use
symlinks with an exploded WAR).

Any suggestion on how to do this efficently (restarting the webapp is
not an option)?

Regards,
Jérôme.

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Templates (re)loading...

Posted by Jamie Orchard-Hays <ja...@dang.com>.
can you make a secured page that you could call the reset service from? 
Upload the new Border, then call the reset.

<component id="resetLink" type="ServiceLink">
     <binding name="service" expression="'reset'"/>
     <binding name="parameters" expression="page.pageName"/>
     <binding name="disabled" 
expression="!page.engine.isResetServiceEnabled()"/>
</component>



Jérôme BERNARD wrote:
> On 5/27/05, Andreas Andreou <an...@di.uoa.gr> wrote:
> 
>>How are you planning on including those DW templates in your Tapestry pages?
> 
> 
> I don't want to include DW templates.
> DW will generate the Tapestry templates.
> 
> 
>>Do you want to allow him to also reorder Tapestry's components within a
>>page?
>>If this is NOT the case, then you can write a border component that
>>includes those static
>>templates (there's a component at Tassel for including static files
>>within a Tapestry page, but you might want to write a simpler one yourself)
> 
> 
> I am in need of a kind of Border component whose template is generated
> by DW and can be altered in time.
> 
> 
>>If the DW templates also contain references to Tapestry components than
>>you'ld have to somehow instruct Tapestry to reload them.
>>You'll probably have to dig into Tap's source for how to do this, cause
>>i don't really know :)
> 
> 
> I don't think I'll be in need of such a thing.
> 
> 
>>Perhaps you could extend the SpecificationResolver class (or Loader or
>>somthing like that)
>>Also note, that if those templates reside in the WEB-INF folder the
>>servlet container's classloader may not catch the changes
>>(there usually exists a configuration for this - but you can also store
>>them in the main context path).
> 
> 
> I was thinking of another solution: instruct Tapestry to reload the
> "Border" template.
> 
> Howard or Eric, any suggestion on how to do it?
> 
> Perhaps using JMX? (I activated the JMX support of Hivemind and I do
> have all my page objects exported in the JMX server).
> 
> 
>>I'ld be interested to hear your progress on this.
> 
> 
> I'll keep you informed.
> 
> Thanks,
> Jérôme.
> 
> 
>>Jιrτme BERNARD wrote:
>>
>>
>>>This is something I can't even consider: this is a production system,
>>>not a development one. I can't afford not to use caching of the
>>>templates (it would be too slow otherwise).
>>>
>>>I need to find a way to discard the cache whenever I need it.
>>>
>>>Regards,
>>>Jιrτme.
>>>
>>>On 5/27/05, Ben Walding <be...@walding.com> wrote:
>>>
>>>
>>>
>>>>Take a look at
>>>>http://jakarta.apache.org/tapestry/faq.html#faq-N10197-menu (you'll have
>>>>to scroll down manually)
>>>>
>>>>Jιrτme BERNARD wrote:
>>>>
>>>>
>>>>
>>>>
>>>>>Hi,
>>>>>
>>>>>I have a client that basically wants to be able to change the layout
>>>>>of the pages generated by Tapestry.
>>>>>
>>>>>He is usually working with DreamWeaver using the templating feature so
>>>>>that he can easily change all his static pages.
>>>>>
>>>>>He would like to be able to use those DW templates with Tapestry
>>>>>pages. This could be quite easy: DW would generate the templates used
>>>>>by Tapestry (for DW it would be regular files generated by its own
>>>>>template). But the thing is, my client may change quite frequently the
>>>>>templates (about once a week), so I need to find a way to reload the
>>>>>templates "on demand" and potentially to have the templates "out of
>>>>>the webapp" so that my client can FTP them (otherwise, I'll try to use
>>>>>symlinks with an exploded WAR).
>>>>>
>>>>>Any suggestion on how to do this efficently (restarting the webapp is
>>>>>not an option)?
>>>>>
>>>>>Regards,
>>>>>Jιrτme.
>>>>>
>>>>>---------------------------------------------------------------------
>>>>>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>>>>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>---------------------------------------------------------------------
>>>>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>>>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>>>
>>>>
>>>>
>>>>
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>>
>>>
>>>
>>>
>>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Templates (re)loading...

Posted by Jérôme BERNARD <je...@gmail.com>.
On 5/27/05, Andreas Andreou <an...@di.uoa.gr> wrote:
> How are you planning on including those DW templates in your Tapestry pages?

I don't want to include DW templates.
DW will generate the Tapestry templates.

> Do you want to allow him to also reorder Tapestry's components within a
> page?
> If this is NOT the case, then you can write a border component that
> includes those static
> templates (there's a component at Tassel for including static files
> within a Tapestry page, but you might want to write a simpler one yourself)

I am in need of a kind of Border component whose template is generated
by DW and can be altered in time.

> If the DW templates also contain references to Tapestry components than
> you'ld have to somehow instruct Tapestry to reload them.
> You'll probably have to dig into Tap's source for how to do this, cause
> i don't really know :)

I don't think I'll be in need of such a thing.

> Perhaps you could extend the SpecificationResolver class (or Loader or
> somthing like that)
> Also note, that if those templates reside in the WEB-INF folder the
> servlet container's classloader may not catch the changes
> (there usually exists a configuration for this - but you can also store
> them in the main context path).

I was thinking of another solution: instruct Tapestry to reload the
"Border" template.

Howard or Eric, any suggestion on how to do it?

Perhaps using JMX? (I activated the JMX support of Hivemind and I do
have all my page objects exported in the JMX server).

> I'ld be interested to hear your progress on this.

I'll keep you informed.

Thanks,
Jérôme.

> Jιrτme BERNARD wrote:
> 
> >This is something I can't even consider: this is a production system,
> >not a development one. I can't afford not to use caching of the
> >templates (it would be too slow otherwise).
> >
> >I need to find a way to discard the cache whenever I need it.
> >
> >Regards,
> >Jιrτme.
> >
> >On 5/27/05, Ben Walding <be...@walding.com> wrote:
> >
> >
> >>Take a look at
> >>http://jakarta.apache.org/tapestry/faq.html#faq-N10197-menu (you'll have
> >>to scroll down manually)
> >>
> >>Jιrτme BERNARD wrote:
> >>
> >>
> >>
> >>>Hi,
> >>>
> >>>I have a client that basically wants to be able to change the layout
> >>>of the pages generated by Tapestry.
> >>>
> >>>He is usually working with DreamWeaver using the templating feature so
> >>>that he can easily change all his static pages.
> >>>
> >>>He would like to be able to use those DW templates with Tapestry
> >>>pages. This could be quite easy: DW would generate the templates used
> >>>by Tapestry (for DW it would be regular files generated by its own
> >>>template). But the thing is, my client may change quite frequently the
> >>>templates (about once a week), so I need to find a way to reload the
> >>>templates "on demand" and potentially to have the templates "out of
> >>>the webapp" so that my client can FTP them (otherwise, I'll try to use
> >>>symlinks with an exploded WAR).
> >>>
> >>>Any suggestion on how to do this efficently (restarting the webapp is
> >>>not an option)?
> >>>
> >>>Regards,
> >>>Jιrτme.
> >>>
> >>>---------------------------------------------------------------------
> >>>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> >>>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >>>
> >>>
> >>>
> >>>
> >>>
> >>---------------------------------------------------------------------
> >>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> >>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >>
> >>
> >>
> >>
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
> >
> >
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
>

Re: Templates (re)loading...

Posted by Andreas Andreou <an...@di.uoa.gr>.
How are you planning on including those DW templates in your Tapestry pages?
Do you want to allow him to also reorder Tapestry's components within a 
page?
If this is NOT the case, then you can write a border component that 
includes those static
templates (there's a component at Tassel for including static files 
within a Tapestry page, but you might want to write a simpler one yourself)
If the DW templates also contain references to Tapestry components than 
you'ld have to somehow instruct Tapestry to reload them.
You'll probably have to dig into Tap's source for how to do this, cause 
i don't really know :)
Perhaps you could extend the SpecificationResolver class (or Loader or 
somthing like that)
Also note, that if those templates reside in the WEB-INF folder the 
servlet container's classloader may not catch the changes
(there usually exists a configuration for this - but you can also store 
them in the main context path).
I'ld be interested to hear your progress on this.

Jιrτme BERNARD wrote:

>This is something I can't even consider: this is a production system,
>not a development one. I can't afford not to use caching of the
>templates (it would be too slow otherwise).
>
>I need to find a way to discard the cache whenever I need it.
>
>Regards,
>Jιrτme.
>
>On 5/27/05, Ben Walding <be...@walding.com> wrote:
>  
>
>>Take a look at
>>http://jakarta.apache.org/tapestry/faq.html#faq-N10197-menu (you'll have
>>to scroll down manually)
>>
>>Jιrτme BERNARD wrote:
>>
>>    
>>
>>>Hi,
>>>
>>>I have a client that basically wants to be able to change the layout
>>>of the pages generated by Tapestry.
>>>
>>>He is usually working with DreamWeaver using the templating feature so
>>>that he can easily change all his static pages.
>>>
>>>He would like to be able to use those DW templates with Tapestry
>>>pages. This could be quite easy: DW would generate the templates used
>>>by Tapestry (for DW it would be regular files generated by its own
>>>template). But the thing is, my client may change quite frequently the
>>>templates (about once a week), so I need to find a way to reload the
>>>templates "on demand" and potentially to have the templates "out of
>>>the webapp" so that my client can FTP them (otherwise, I'll try to use
>>>symlinks with an exploded WAR).
>>>
>>>Any suggestion on how to do this efficently (restarting the webapp is
>>>not an option)?
>>>
>>>Regards,
>>>Jιrτme.
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>>
>>>
>>>
>>>      
>>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>
>>
>>    
>>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>
>  
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Templates (re)loading...

Posted by Jérôme BERNARD <je...@gmail.com>.
This is something I can't even consider: this is a production system,
not a development one. I can't afford not to use caching of the
templates (it would be too slow otherwise).

I need to find a way to discard the cache whenever I need it.

Regards,
Jérôme.

On 5/27/05, Ben Walding <be...@walding.com> wrote:
> Take a look at
> http://jakarta.apache.org/tapestry/faq.html#faq-N10197-menu (you'll have
> to scroll down manually)
> 
> Jérôme BERNARD wrote:
> 
> >Hi,
> >
> >I have a client that basically wants to be able to change the layout
> >of the pages generated by Tapestry.
> >
> >He is usually working with DreamWeaver using the templating feature so
> >that he can easily change all his static pages.
> >
> >He would like to be able to use those DW templates with Tapestry
> >pages. This could be quite easy: DW would generate the templates used
> >by Tapestry (for DW it would be regular files generated by its own
> >template). But the thing is, my client may change quite frequently the
> >templates (about once a week), so I need to find a way to reload the
> >templates "on demand" and potentially to have the templates "out of
> >the webapp" so that my client can FTP them (otherwise, I'll try to use
> >symlinks with an exploded WAR).
> >
> >Any suggestion on how to do this efficently (restarting the webapp is
> >not an option)?
> >
> >Regards,
> >Jérôme.
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
> >
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Templates (re)loading...

Posted by Ben Walding <be...@walding.com>.
Take a look at 
http://jakarta.apache.org/tapestry/faq.html#faq-N10197-menu (you'll have 
to scroll down manually)

Jérôme BERNARD wrote:

>Hi,
>
>I have a client that basically wants to be able to change the layout
>of the pages generated by Tapestry.
>
>He is usually working with DreamWeaver using the templating feature so
>that he can easily change all his static pages.
>
>He would like to be able to use those DW templates with Tapestry
>pages. This could be quite easy: DW would generate the templates used
>by Tapestry (for DW it would be regular files generated by its own
>template). But the thing is, my client may change quite frequently the
>templates (about once a week), so I need to find a way to reload the
>templates "on demand" and potentially to have the templates "out of
>the webapp" so that my client can FTP them (otherwise, I'll try to use
>symlinks with an exploded WAR).
>
>Any suggestion on how to do this efficently (restarting the webapp is
>not an option)?
>
>Regards,
>Jérôme.
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Templates (re)loading...

Posted by Howard Lewis Ship <hl...@gmail.com>.
Depends; the reset service ensures that the timing is correct (at the
end of the request).

On 5/30/05, Jérôme BERNARD <je...@gmail.com> wrote:
> Digging through Tapestry code, I've seen that the reset service do
> actually call the ResetEventCoordinator identified by service point
> "tapestry.ResetEventCoordinator". Wouldn't it be simpler to call
> directly the fireResetEvent() of this class?
> 
> Regards,
> Jérôme.
> 
> On 5/28/05, Kenny Chong <ke...@gmail.com> wrote:
> > You may use the 'reset' service.
> >
> > -----Original Message-----
> > From: Jérôme BERNARD [mailto:jerome.bernard@gmail.com]
> > Sent: Friday, May 27, 2005 5:25 PM
> > To: Tapestry users
> > Subject: Templates (re)loading...
> >
> > Hi,
> >
> > I have a client that basically wants to be able to change the layout
> > of the pages generated by Tapestry.
> >
> > He is usually working with DreamWeaver using the templating feature so
> > that he can easily change all his static pages.
> >
> > He would like to be able to use those DW templates with Tapestry
> > pages. This could be quite easy: DW would generate the templates used
> > by Tapestry (for DW it would be regular files generated by its own
> > template). But the thing is, my client may change quite frequently the
> > templates (about once a week), so I need to find a way to reload the
> > templates "on demand" and potentially to have the templates "out of
> > the webapp" so that my client can FTP them (otherwise, I'll try to use
> > symlinks with an exploded WAR).
> >
> > Any suggestion on how to do this efficently (restarting the webapp is
> > not an option)?
> >
> > Regards,
> > Jérôme.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
> 


-- 
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Templates (re)loading...

Posted by Jérôme BERNARD <je...@gmail.com>.
Digging through Tapestry code, I've seen that the reset service do
actually call the ResetEventCoordinator identified by service point
"tapestry.ResetEventCoordinator". Wouldn't it be simpler to call
directly the fireResetEvent() of this class?

Regards,
Jérôme.

On 5/28/05, Kenny Chong <ke...@gmail.com> wrote:
> You may use the 'reset' service.
> 
> -----Original Message-----
> From: Jérôme BERNARD [mailto:jerome.bernard@gmail.com]
> Sent: Friday, May 27, 2005 5:25 PM
> To: Tapestry users
> Subject: Templates (re)loading...
> 
> Hi,
> 
> I have a client that basically wants to be able to change the layout
> of the pages generated by Tapestry.
> 
> He is usually working with DreamWeaver using the templating feature so
> that he can easily change all his static pages.
> 
> He would like to be able to use those DW templates with Tapestry
> pages. This could be quite easy: DW would generate the templates used
> by Tapestry (for DW it would be regular files generated by its own
> template). But the thing is, my client may change quite frequently the
> templates (about once a week), so I need to find a way to reload the
> templates "on demand" and potentially to have the templates "out of
> the webapp" so that my client can FTP them (otherwise, I'll try to use
> symlinks with an exploded WAR).
> 
> Any suggestion on how to do this efficently (restarting the webapp is
> not an option)?
> 
> Regards,
> Jérôme.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


RE: Templates (re)loading...

Posted by Kenny Chong <ke...@gmail.com>.
You may use the 'reset' service.

-----Original Message-----
From: Jérôme BERNARD [mailto:jerome.bernard@gmail.com] 
Sent: Friday, May 27, 2005 5:25 PM
To: Tapestry users
Subject: Templates (re)loading...

Hi,

I have a client that basically wants to be able to change the layout
of the pages generated by Tapestry.

He is usually working with DreamWeaver using the templating feature so
that he can easily change all his static pages.

He would like to be able to use those DW templates with Tapestry
pages. This could be quite easy: DW would generate the templates used
by Tapestry (for DW it would be regular files generated by its own
template). But the thing is, my client may change quite frequently the
templates (about once a week), so I need to find a way to reload the
templates "on demand" and potentially to have the templates "out of
the webapp" so that my client can FTP them (otherwise, I'll try to use
symlinks with an exploded WAR).

Any suggestion on how to do this efficently (restarting the webapp is
not an option)?

Regards,
Jérôme.

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org