1 package org.starobjects.wicket.model.models;
2
3
4
5
6
7 public class WelcomeModel extends ModelAbstract<String> {
8
9 private static final long serialVersionUID = 1L;
10
11 private static final String DEFAULT_MESSAGE =
12 "WicketObjects combines the power of Apache Wicket for web UIs " +
13 "with Naked Objects for domain modelling. " +
14 "Out-of-the box you get a fully-functional webapp just from " +
15 "your domain objects; you can then customize the UI by " +
16 "writing custom Wicket components, replacing the page layouts or " +
17 "simply by altering the CSS";
18
19 private String welcomeMessage;
20
21 public WelcomeModel(final String welcomeMessage) {
22 this.welcomeMessage = welcomeMessage;
23 }
24
25 public WelcomeModel() {
26 this(DEFAULT_MESSAGE);
27 }
28
29 @Override
30 protected String load() {
31 return welcomeMessage;
32 }
33
34 @Override
35 public void setObject(String welcomeMessage) {
36 super.setObject(welcomeMessage);
37 this.welcomeMessage = welcomeMessage;
38 }
39
40 }