I am trying to create my first tapestry component. Basically I want to take a 
collection of keywords and for each keyword generate a link to a tapestry page. 
I'd like to use the component in page templates like <t:keywords keywords="x" 
page="y" />

I have written the component class and template:

public class Keywords {
    @Parameter
    private List<Keyword> keywords;
    
    @Parameter
    private String page;
    
    private Keyword keyword;
...
}

Keywords.tml

    <t:pagelink page="page" 
context="${keyword.id}">${keyword.value}</t:pagelink>

The problem I have is how to pass the page name to the component from the 
calling page's template, I am using the component in ViewPhoto.tml

<t:keywords keywords="photo.keywords" page="home" />

But tapestry is complaining because it can't find a property called page on the 
ViewPhoto page (which is correct). So my question is how do I pass a literal 
string to the component in the calling page's template? or do i have to define 
a property called page on the ViewPhoto page?

Thanks guys

T


Reply via email to