Here is a weird one.
Probably a minor bug report, will open JIRA if anyone else can
agree/reproduce.
See the pagelink above grid in the code below? If there are three records,
last id=3, it will render with the last pagelink (person/edit/3). This
makes the Create new link pull up the third record for edit. Instead of
rendering with empty person. I am reusing Edit page as create, obviously.
<html t:type="admin" title="Persons"
xmlns:t="http://tapestry.apache.org/schema/tapestry_5_3.xsd"
xmlns:p="tapestry:parameter">
<body>
<t:pagelink page="person/edit">Create new</t:pagelink>
<t:grid source="persons" row="person" add="delete"
include="code,name,organization,contact"
reorder="code,name,organization,contact">
<p:deleteCell>
<t:actionlink t:id="delete" context="person.id">Delete</t:actionlink>
</p:deleteCell>
<p:nameCell>
<t:pagelink page="person/edit"
context="person.id">${person.name}</t:pagelink>
</p:nameCell>
<p:empty>
<p>There are no records; you can <t:pagelink page="person/edit">add
some</t:pagelink>.</p>
</p:empty>
</t:grid>
</body>
</html>
--
View this message in context:
http://tapestry.1045711.n5.nabble.com/Pagelink-above-grid-picks-up-context-from-last-pagelink-in-grid-tp5660049p5660049.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]