Do these links help?

http://localhost:8080/jumpstart/examples/input/forms1
http://localhost:8080/jumpstart/examples/navigation/onactivateandonpassivate/3
http://localhost:8080/jumpstart/examples/navigation/whatiscalledandwhen

Regardng pooling, you should assume the page instance you set up is NOT the same instance that will be rendered.

Geoff

On 09/12/2008, at 2:19 PM, Luther Baker wrote:

Question about the flow.

I GET ViewProject.tml with an activation context of "1" which invokes:
   ViewProject.onActivate(Integer projectId)

I echo the projectId to the screen as a context for a CreateIssue pagelink.
I visit or GET CreateIssue.tml which invokes:
   CreateIssue.onActivate(Integer projectId)
   Createissue.onPassivate()


*Q1*: ?? Why does onPassivate get called here - but not when I visited
ViewProject ??


I complete two fields on the CreateIssue.tml form and submit the form to
CreateIssue.java which invokes
   CreateIssue.onActivate(Integer projectId)
   CreateIssue.onSuccess()


*Q2*: ?? Why isn't CreateIssue.onPassivate called ??


I return CreateIssue.onSuccess returns "ViewProject.class" which invokes:
   ViewProject.onPassivate()
   ViewProject.onActivate(Integer projectId)


*Q3*: ?? Whoa? How'd that happen? I'm going TO ViewProject.tml --- and yet,
onPassivate is invoked first. obviously, ViewProject has NO IDEA what
projectId to return since, it was invoked without an ACTIVATION context. Is that why onPassivate is called? to find an activation context? I know the docs say that if no activation context is passed - Tapestry will ask the
page for one. Is this how? If so - one need be a bit careful about how
onPassivate is implemented?

Is there an HttpSession free way to forward to have CreateIssue.onSuccess >>
ViewProject.onActivate(Integer projectId) ?

So - I'm not sure how I can forward to another page and pass an activation context along with the forward ... Is there a way? After taking a look here, http://tapestry.apache.org/tapestry5/tapestry-core/guide/ pagenav.html, I
decided to try to @InjectPage so that

CreateIssue.onSuccess()
{
  nextPage.setProject(project);
  return nextPage;
}

and changed ViewProject.onPassivate() to return project.getId() ... which, is naturally used by ViewProject.Activate(Integer projectId) which is called
next.

Does that seem like the right way to do this? I don't need to @Persist as the example has done - since with this method, I can cause onPassivate to return what onActivate needs ... and I really don't need to save this info after the request is handled... But, is it safe to assume that the instance of the page returned by CreateIssue will be the instance that handles the request ... ie: do I have a pooling concern when I'm directly assigning page
properties?

Man ... this is cool.

-Luther


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to