Hi,
It is just a simple TEST application
import br.com.elf.ui.IndexApplication;
public class IndexApplication extends Application {
public void init() {
setMainWindow(getStartUpWindow());
}
private Window getStartUpWindow() {
Window mainWindow = new Window();
mainWindow.addComponent(
new Label(new Property() {
public Object getValue() {
return "DataModel Example";
}
public void setValue(Object value) throws ReadOnlyException, ConversionException {
throw new ReadOnlyException();
}
public Class<?> getType() {
return String.class;
}
public boolean isReadOnly() {
return true;
}
public void setReadOnly(boolean readyOnly) {
// Empty body
}
));
}
return mainWindow;
}
}
Notice i have i plain Label field. I know i can just call
mainWindow.addComponent(new Label("DataModel Example"));
instead. But in order to see how Property DataModel works behind the scenes, i have added a Property implementation. But instead of seeing in output
DataModel Example
I get
br.com.elf.ui.IndexApplication$1@63a721
Why ???
And what the real purpose of Object getType() method defined in Property interface ??? If HTML shows its output in plain String, so i think there is no reason to implement a Object getType(), do not ???
regards,