tags:

views:

47

answers:

3

I have a tapestry url that looks like

http://localhost:8888/forwardtask/88

how do i get the 88 bit? thanks. Tapestry is such a pain to use

+3  A: 

Have a look at the page navigation section in the Tapestry 5 docs, particularly Page Activation.

Effectively, you'll want this in your page class:

void onActivate(long forwardTaskId) {
    ...
}

This bit will execute before the page renders if there is a parameter in the URL.

Tapestry has some non-obvious concepts that you'll have to understand to be effective, but it's not rocket science. Good luck!

Henning
A: 

typically (althought I dont know all the cases) paths in Tapestry are defined by OnActivate and onPassivate and they are generated by event context clicks (pagelink,actionlink,eventlink). check the context elements in the .tml your coming from and then look at the Active and Passive methods on the page your going to.

ebt
A: 

If you are using a newer version 5.1 Tapestry you can just create a variable like:

@PageActivationContext
int myNumber
Mark

related questions