String className = path.substring(0, index);
segment = path.substring(index + 1);
type = dataProvider.getModelService().loadModelType(
className);
if (type == null) {
throw new XWTException("Class " + className
+ " not found");
}
dataProvider = XWT.findDataProvider(type);
}
}
type = dataProvider.getDataType(segment);
if (type != null) {
dataProvider = XWT.findDataProvider(type);
if (dataProvider == null) {
throw new XWTException(
"Data probider is not found for the type "
+ type.toString());
}
} else {
throw new XWTException(
"Type is not found for the property " + segment);
}
}
String segment = segments[last];
int length = segment.length();
if (length > 1 && segment.charAt(0) == '('
&& segment.charAt(length - 1) == ')') {
// It is class
String path = segment.substring(1, segment.length() - 1);
int index = path.lastIndexOf('.');
if (index != -1) {
String className = path.substring(0, index);
segment = path.substring(index + 1);
type = dataProvider.getModelService().loadModelType(
className);
if (type == null) {
throw new XWTException("Class " + className
+ " not found");
}
dataProvider = XWT.findDataProvider(type);
}
}