提交 2986e993 编写于 作者: S Serge Rider

URL preview editor fix

上级 727ab3b4
......@@ -47,13 +47,15 @@ public class URLPreviewEditor extends BaseValueEditor<Browser> {
@Override
public void primeEditorValue(@Nullable Object value) throws DBException
{
final String strValue = valueController.getValueHandler().getValueDisplayString(valueController.getValueType(), value, DBDDisplayFormat.EDIT);
control.setText("<div>Loading " + strValue + "...</div>");
control.setUrl(strValue);
if (control != null) {
final String strValue = valueController.getValueHandler().getValueDisplayString(valueController.getValueType(), value, DBDDisplayFormat.EDIT);
control.setText("<div>Loading " + strValue + "...</div>");
control.setUrl(strValue);
}
}
@Override
public Object extractEditorValue() throws DBCException {
return control.getUrl();
return control == null? null : control.getUrl();
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册