// check if instance is valid
IPersistenceManager persistenceManager = PersistenceManagerFactory.getPersistenceManager();
IWidgetInstance widgetInstance = persistenceManager.findWidgetInstanceByIdKey(id_key);
if (widgetInstance == null) return localizedMessages.getString("WidgetAPIImpl.0");
//
IPreference preference = widgetInstance.getPreference(key);
if (preference == null) return localizedMessages.getString("WidgetAPIImpl.1");
return preference.getDvalue();
}