On Sun, Sep 12, 2010 at 8:37 PM, sakthi vel <[email protected]> wrote:
> Hello,
>
> I want to display a value of label using the concept of
> Internationalization.
> Actually there are number of property file for different languages.
> When I try to add the dynamic field to property file, I am getting an
> exception
>
> *WicketMessage: No get method defined for class: class
> org.apache.wicket.markup.html.form.Form expression: personName*
>
>
> Content of files are
>
> *Property files:*
> status: Hello ${personName}
>
>
> *Html file:*
> <span wicket:id = "hello"></span>
>
> Model file:
>
> public class NameModel
> {
> private String personName;
> public String getPersonName()
> {
> return personName;
> }
>
> public void setPersonName(String personName)
> {
> this.personName;
> }
> }
>
>
> *Java file:*
>
> NameModel nameModel = new NameModel();
> nameModel.setPersonName("Test");
>
> add(new Label("lblProperty", new StringResourceModel("hello", this, new
> PropertyModel(nameModel, "personName"))));
>
Can you paste the exact code of this file.
According to the exception Wicket looks for property "personName" in a Form,
not in your model.
>
>
> Could anyone explain what is the reason for receiving this exception and
> steps to overcome this.
>