You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Josh Penza <jo...@gmail.com> on 2007/10/07 13:19:17 UTC
passing parameters
I have a Start page, that has the following template:
<t:layout>
<t:content categoryId="categoryId"/>
</t:layout>
When I click on a category in the enclosing layout component I catch the Id
in the onAction method.
But how do I pass this id from the layout component to the content component
in the start component?
At the moment I am doing this, the categoryId is in my startpage, but is not
forwarded to the content component
*/ Layout */
onAction(int id) {
startPage.setup(id);
return startPage;
}
*/ Start */
private int categoryId;
private void setup(int id) {
this.categoryId = id;
}
public get and setter for the categoryId
/*Content*/
@Parameter(required=true)
private int categoryId;