I've just gone through the thread here
http://tapestry.1045711.n5.nabble.com/Pagelink-above-grid-picks-up-context-from-last-pagelink-in-grid-td5660049.html

And I've taken out a few comments:

-------------------------------------------
Can I see the serverside code for your edit page? I get the feeling that
onPassivate() is being called on the edit page and returning an id persisted
in the session. 
-------------------------------------------
It seems that you're reusing the same field for the grid's current row  
*and* the object being edited or created. This is probably the cause of  
your problems. Have two separate fields, one for each scenario (listing or  
editing). 
-------------------------------------------
By the way, now I'm 100% sure, Pagelink above grid picks up context from  
last pagelink in grid because you're using the same field for object  
editing/creation and for the Grid current object parameter. Then you  
(netdawg) return the field value in onPassivate(). In other words,  
Tapestry is behaving exactly like expected, your code is wrong in this  
case. Never use the same field for two different roles. 
-------------------------------------------
I still get the feeling that you are using a single Person property instead
of two. You MUST have two properties of type Person. One will be used by
your grid to store each row as it the grid iterates through. This MUST NOT
be tied to onActivate() / onPassivate(). The other will store the Person
currently being edited. This will be tied to onActivate() and onPassivate()
and init() [see my previous example] 
-------------------------------------------
You shouldn't @Persist personRow. 
-------------------------------------------

Now, let's take a look at your blog entry (written after all of these
responses) here http://crudsqbe.wordpress.com/2012/04/29/tapestry/

public class EditPerson {
30        @PageActivationContext
31        @Property
32        @Persist
33        private Person person;
}

1. You have a single instance of person instead of two
2. You are persisting the object used to iterate the grid
3. You have tied @Persist to onPassivate()

It's at this point we gave up. No point in flogging a dead horse.

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Can-Component-Template-be-Informed-by-Page-Class-tp5681397p5685139.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to