01: // (c) copyright 2006 by eXXcellent solutions, Ulm. Author: bschmid
02:
03: package foo.bar;
04:
05: import org.wings.SComponent;
06:
07: /**
08: * A very simple component showing how to create and implement custom component for the wingS framework.
09: *
10: * @author Benjamin Schmid <B.Schmid@exxcellent.de>
11: */
12: public class MyComponent extends SComponent {
13:
14: private String payload;
15:
16: public MyComponent(final String payload) {
17: this .payload = payload;
18: }
19:
20: public String getPayload() {
21: return payload;
22: }
23:
24: public void setPayload(final String payload) {
25: // We must notify the reload manager if the view of our component changes i.e. due to
26: // a changed attribute.
27: reloadIfChange(payload, this.payload);
28: this.payload = payload;
29: }
30: }
|