Hi Preston. If you continue to have problems with not getting your
templates reloaded, you might also try out JettyLauncher
(http://jettylauncher.sourceforge.net/).
I know that some people have had problems with the Sysdeo Tomcat plugin
in the past on this list.
I use JettyLauncher on a daily basis (with page caching disabled) and I
know lots of people on this list use it a lot so it's highly compatible
with Tapestry and quite easy to configure and use.
Hang in there, Tapestry will eventually be very very good to you. :) I
seem to recall a quote by someone on the list along the lines of "the
most difficult thing in learning Tapestry is unlearning all the bad
habits you've previously aquired", and I certainly found that to be the
case when I was learning it.
Take care,
Danny
Preston CRAWFORD wrote:
To answer your questions.
#1 - I have tried starting tomcat in that fashion and I still get the
same error. As I explained earlier, I followed the directions here
(http://blog.shadowbox.com/index.php?p=40 ) to try to get this going.
I couldn't get it to work for some reason.
#2 - As far as what I'm trying to accomplish? I'm trying to get
productive in Tapestry as quickly as possible. And in part that means
that in my development environment I can work in a more rapid fashion.
With JSP/Struts, etc. if I make changes to the JSP files I simply have
to create an Ant target that copies the JSP files into the proper
deployment directory and a refresh of the page does the rest. Here I
can't seem to get that working. I want to be able to change templates
and spec files and then be able to see my changes quickly, without
rebuilding the war, throwing it over the wall to the app server, and
restarting.
#3 - Regarding includes. We have the need to have items like a dynamic
side menu, a dynamic top menu. Items that will be reused over and over
again. And this could just be a lack of understanding of the Tapestry
mindset, but we just haven't been able to figure out how to accomplish
this. I hate to use the JSP paradigm, but in this case you start from
what you know. And what I know is an include. I'm trying to figure out
how to accomplish the same functionality in Tapestry. Basically an HTML
template that can be dropped into any other HTML template, but get
pre-processed the same way as the HTML template it's been included into.
A server side include, for lack of a better term.
I'll take a look at your example in depth later. But this is what I'm
trying to acheive. And this isn't me saying that Tapestry isn't a good
framework. I'm not making a judgement call. I like the look of Tapestry.
But I'm not sure how long it will take to get as productive in it as I
already am in Struts/JSP, etc.
Preston
[EMAIL PROTECTED] 7/19/2005 6:31 PM >>>
Preston CRAWFORD wrote:
I agree that the community is great and that the idea of Tapestry is
great. But often times you just need to get stuff done. And right now
we
can't figure out how to get an include into a page (like you'd do
with a
SSI in JSP) where any code gets pre-processed just like the rest of
the
page. And we can't figure out how to restart the Tapestry engine in
order to see changes to the spec and template files quickly.
Q: Have you tried starting tomcat, or your tomcat-plugin, or jetty, or
resin, or whatever other servlet container you use with the
-Dorg.apache.tapestry.disable-caching=true option? If what you want is
to be able to see template/spec changes immediately, this will do the
trick.
Regarding preprocessing: as Kevin pointed out... what is it,
specifically, that you are trying to accomplish? In what manner should
the stuff be "processed"? And does the "included" file need to be
chosen
dynamically? Generally speaking, in tapestry, rather than having a
single page and including content, you write a border component, which
is included on the content pages. But, if what you want is to
dynamically include blocks of html which are processed by tapestry,
then
you really need to look at block/renderblock.
As an example, suppose you had a page with an area for "properties".
The
"properties" page/content to be used depends on what type of object is
being edited by the page. You need the properties portion to be
fully-functional "tapestry" stuff, but the properties of the various
objects are so different as to render making a single component to
handle all of them difficult, messy, etc. So, you might do something
like define a "getPropertiesPageName" method in each of the
object-types
to edit. This returns the name of a page to edit. Additionally, you
could define a "getPropertiesBlockName" method, which gets the name of
the block to edit. Then, in the java class of the page to edit, you
can
do something like:
public IComponent getBlock() {
IPage page =
getRequestCycle().getPage(getObject().getPropertiesPageName());
return page.getComponent(getObject().getPropertiesBlockName());
}
And in the html file, you could then do:
<div jwcid="@RenderBlock" block="ognl:block"/>
voila... you've just included arbitrary content.
There is a caveat to this approach. Since "activate"
is never called on the page with the block, methods like
"pageBeginRender", "pageValidate", etc. are /not/ called by tapestry.
So, you'll have to exercise a bit of care in how/where you initialize
things. But, it does work. :)
Robert
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]