Valentin Genevrais
Valentin Genevrais

Reputation: 453

How can y use Tapestry component with String parameters?

This is the code of my tapestry component : (it works)

import org.apache.tapestry5.annotations.Parameter;
import org.apache.tapestry5.annotations.Property;
public class SimpleChart {
    @Property
    @Parameter(value="123")
    private String title;
}

But when I write "abc" instead of "123", It doesn't work anymore. I need to replace the number with a sentence. Can anyone help me ?

Upvotes: 0

Views: 181

Answers (1)

tywy
tywy

Reputation: 26

Look at the documentation. You forgot the defaultPrefix :

@Parameter(defaultPrefix = BindingConstants.LITERAL, value="abc")

Upvotes: 1

Related Questions