Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: gestring mention

...

where User has a getName() method exposing its "name" property.

The Component class has convenience method which you may find useful:

Code Block
add(new Label("greetings", getString("label.greetings", new Model(user))));

Custom models

If we do not want to use the property expressions/introspection, but instead want to to pull a fresh value from the model on each request in a more strongly typed manner, we could provide our own implementation of IModel:

...