Hello, I'm having a problem with onActivate(). Here are my questions: 1) Why is onActivate() called when a context variable is included in the URL? 2) Is there a way to prevent onActivate() from being called until AFTER onActivate(Integer prmPrimaryKey) is called?
Here's my dilemma: I want to use one detail page to handle inserts and updates. So I have written an onActivate(Integer prmPrimaryKey) handler to initialize the page for an update; and another onActivate() handler to initialize the page for an insert. Each onActivate() handler checks to see if the user is allowed to access this page. If the user is not allowed to access, the onActivate() handler generates a Link with the current page's context, uses that Link to set a Session state variable, and then returns a Login page. Once the user logs in, the Session state variable is checked to see if it has been set; if so, the user is taken back to that page. My problem is that when the page is accessed with a context variable (thus, to handle an UPDATE), onActivate() is being called before onActivate(Integer prmPrimaryKey). Thus, the entity ID of the page isn't being set before the Link is generated and added to the session state. The Link that is being generated, then, doesn't have any context included, so when the user finishes logging in, the user is taken back to the page, with no context. Is this a Tapestry bug, or is there a better way of handling this? Thanks, Andy --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]