@Override
protected void show(String resourceId, HttpServletRequest request,
HttpServletResponse response) throws ResourceNotFoundException,
UnauthorizedAccessException, IOException {
IWidgetInstance instance = WidgetInstancesController.findWidgetInstance(request);
if (instance == null) throw new ResourceNotFoundException();
String name = request.getParameter("propertyname"); //$NON-NLS-1$
if (name == null || name.trim().equals("")) throw new ResourceNotFoundException();
String value = null;
// Note that preferences and shared data keys may be the same!
// We let the shared data values override.
IPreference pref = instance.getPreference(name);
if (pref != null) value = pref.getDvalue();
ISharedData data = new SharedContext(instance).getSharedData(name);
if (data != null) value = data.getDvalue();
if (value == null) throw new ResourceNotFoundException();
PrintWriter out = response.getWriter();