if (firstEssentialPropertyConfig != null) {
String firstEssentialPropertyCode = firstEssentialPropertyConfig
.getCode();
Class firstEssentialPropertyClass = firstEssentialPropertyConfig
.getPropertyClassObject();
textField = new TextField("propertyValue",
new PropertyModel(neighborParent,
firstEssentialPropertyCode,
firstEssentialPropertyClass));
}
}
}
if (textField == null) {
textField = new TextField("propertyValue",
new PropertyModel(entity, propertyCode,
propertyClass));
textField.setVisible(false);
}
} else if (propertyClass == String.class) {
textField = new TextField("propertyValue", new PropertyModel(
entity, propertyCode, propertyClass));
if (propertyConfig.isScramble()) {
setAttribute("type", "password");
}
} else if (propertyClass == Integer.class) {
textField = new TextField("propertyValue", new PropertyModel(
entity, propertyCode, propertyClass)) {
static final long serialVersionUID = 200911L;
public IConverter getConverter() {
return new IntegerConverter();
}
};
textField.setType(Integer.class);
} else if (propertyClass == Long.class) {
textField = new TextField("propertyValue", new PropertyModel(
entity, propertyCode, propertyClass)) {
static final long serialVersionUID = 200912L;
public IConverter getConverter() {
return new LongConverter();
}
};
textField.setType(Long.class);
} else if (propertyClass == Float.class) {
textField = new TextField("propertyValue", new PropertyModel(
entity, propertyCode, propertyClass)) {
static final long serialVersionUID = 200913L;
public IConverter getConverter() {
return new FloatConverter();
}
};
textField.setType(Float.class);
} else if (propertyClass == Double.class) {
textField = new TextField("propertyValue", new PropertyModel(
entity, propertyCode, propertyClass)) {
static final long serialVersionUID = 200914L;
public IConverter getConverter() {
return new DoubleConverter();
}
};
textField.setType(Double.class);
} else if (propertyClass == Date.class) {
textField = new TextField("propertyValue", new PropertyModel(
entity, propertyCode, propertyClass)) {
static final long serialVersionUID = 200915L;
public IConverter getConverter() {
return new DateConverter();
}
};
textField.setType(Date.class);
} else if (propertyClass == URL.class) {
textField = new TextField("propertyValue", new PropertyModel(
entity, propertyCode, propertyClass)) {
static final long serialVersionUID = 200916L;
public IConverter getConverter() {
return new UrlConverter();
}
};
textField.setType(URL.class);
} else if (propertyClass == Email.class) {
textField = new TextField("propertyValue", new PropertyModel(
entity, propertyCode, propertyClass)) {
static final long serialVersionUID = 200917L;
public IConverter getConverter() {
return new EmailConverter();
}