Putting it all Together"
From Documentation
Tmillsclare (talk | contribs) m (Created page with 'Finally we put all the component information together to produce the result below. <source lang="java"> package com.foo; public class SimpleLabel extends org.zkoss.zk.ui.HtmlBa…') |
Tmillsclare (talk | contribs) m |
||
Line 1: | Line 1: | ||
+ | {{ZKComponentDevelopmentEssentialsPageHeader}} | ||
+ | |||
Finally we put all the component information together to produce the result below. | Finally we put all the component information together to produce the result below. | ||
Line 27: | Line 29: | ||
Having implemented the Component we now need to implement the Widget. | Having implemented the Component we now need to implement the Widget. | ||
+ | |||
+ | {{ZKComponentDevelopmentEssentialsPageFooter}} |
Latest revision as of 01:58, 14 July 2010
Finally we put all the component information together to produce the result below.
package com.foo;
public class SimpleLabel extends org.zkoss.zk.ui.HtmlBasedComponent {
private String _value = ""; // a data member
public String getValue() {
return _value;
}
public void setValue(String value) {
if (!_value.equals(value)) {
_value = value;
smartUpdate("value", _value);
}
}
protected void renderProperties(org.zkoss.zk.ui.sys.ContentRenderer renderer)
throws java.io.IOException {
super.renderProperties(renderer);
render(renderer, "value", _value);
}
}
Having implemented the Component we now need to implement the Widget.