Sorry, more newbie questions.
I want to have URLs following a "restful" form, eg:
<website>/stuff/xxx/yyy
where I have a page Stuff which processes xxx/yyy as a 'request
parameter' and dynamically generates appropriate content.
I've got a class Stuff.java and the docs say:
Page render requests are requests to render a particular page. Such
requests may include additional elements on the path, which will be
treated as activation context (generally speaking, the primary key of
some related entity object), allowing the page to reconstruct the state
it will need to succesfully render itself.
The event handler method for the activate event may return a value; this
is treated the same as the return value from a component action request;
typically this will result in a redirect to another page. In this way,
the activate event can perform simple validation at the page level ("can
the user see this page?").
Page render URLs consist of the logical name of the page plus additional
path elements for the activation context. The dispatcher here strips
terms off of the path until it finds a known page name. Thus,
"/mypage/27" would look first for a page whose name was "mypage/27",
then look for a page name "mypage". Assuming the second search was
succesful, the page would be activated with the context "27". If no
logical page name can be identified, control passes to the next dispatcher.
This seems to imply to me that if I have a method
void onActivate(String param)
then param should contain xxx/yyy and I should be able to act on it
accordingly.
And in fact it does. But then the same method is called again with the
value "layout" and the page redisplays. "layout" is the name of my
Layout (well, doh!) and when it redisplays the logo which is part of the
layout.tml file disappears...
If I just use the path <website>/stuff then I don't get the 2nd call to
onActivate.
What am I missing here? Why is my layout template name turning up?
Thanks in advance
Alan Chaney
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org