-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi, I've created a custom component in ZK8. I'm using data binding just like the MVVM book, but I got this problem: my component has a property like 'customProperty' som
my zul
is <customcomponent customProperty="value"/>
, which is always null
in CustomComponent.java
. I need customProperty
to set some behaviors for my component, but it's not working. Any ideas?
[Update]
Sorry, I've been so busy these days.. Well, this is my code
<lookupbox readonly="true" sclass="form-input" columns="name, address" value="@bind(detail.person)"/>
And the java class:
public class Lookupbox extends Bandbox {
private static final long serialVersionUID = 5780997619297491961L;
private Listbox listbox;
private String columns;
@NotifyChange({"listbox", "columns"})
private void init() {
listbox = new Listbox();
Listhead listhead = new Listhead();
if (columns != null) {
String [] column = columns.split(",");
for (String col : column) {
listhead.appendChild(new Listheader(col));
}
}
listbox.appendChild(listhead);
Bandpopup bandpopup = new Bandpopup();
bandpopup.appendChild(listbox);
this.appendChild(bandpopup);
}
public Lookupbox() {
init();
}
public String getZclass() {
return _zclass == null ? "z-lookupbox" : _zclass;
}
public Listbox getListbox() {
return listbox;
}
public String getColumns() {
return columns;
}
@NotifyChange("columns")
public void setColumns(String columns) {
this.columns = columns;
}
}
columns
property is always null
. Am I missing some @NotifyChange()
?
Asked: 2017-03-07 01:09:12 +0800
Seen: 47 times
Last updated: Mar 09 '17
Attributes in macro was not updated after notifyChange
MVVM Validator: class not found ? [closed]
Id attribute set in zul code doesn't reflect in html code? [closed]
Conditional evaluation component in mvvm
passing present viewmodel to included page. [closed]
Upload Button dosn't work on chrome
How to handle big (large) file upload?
Children Binding : UiException Callable only in the event listener
Show component code and zul part please
chillworld ( 2017-03-07 05:05:27 +0800 )edit