if (type != null) {
segment = null;
}
}
if (type == null) {
throw new XWTException("Class " + className
+ " not found");
}
dataProvider = XWT.findDataProvider(type);
}
}
}
if (currentPath == null) {
currentPath = segment;
} else if (segment != null) {
currentPath = currentPath + '.' + segment;
}
IObservable segmentValue = scopeManager.getObservableValue(widget,
value, currentPath);
try {
if (segmentValue == null) {
if (segment != null) {
segmentValue = createValueProperty(dataValue, segment,
type);
if (segmentValue == null) {
throw new XWTException(" Property " + segment
+ " is not found in "
+ expressionPath.getFullPath());
// maybe to
// raise an
// exception
}
scopeManager.addObservableValue(widget, value,
currentPath, segmentValue);
} else if (dataValue instanceof IObservable){
segmentValue = (IObservable)dataValue;
}
}
else if (segment == null && type != null) {
if (segmentValue instanceof TypedViewerObservableValueDecorator) {
TypedViewerObservableValueDecorator typedViewerObservableValueDecorator = (TypedViewerObservableValueDecorator) segmentValue;
typedViewerObservableValueDecorator.setElementType(type);
}
}
} catch (IllegalArgumentException e) {
// Property is not found
String message = e.getMessage();
if (!message.startsWith("Could not find property with name")) {
throw e;
}
throw new XWTException(" Property " + segment
+ " is not found in " + expressionPath.getFullPath()); // maybe
// to
// raise
// an
// exception