Widget showlet = new Widget();
IWidgetTypeManager showletTypeMan =
(IWidgetTypeManager) this.getService(SystemConstants.WIDGET_TYPE_MANAGER);
WidgetType WidgetType = showletTypeMan.getWidgetType("content_feedback_viewer");
showlet.setType(WidgetType);
ApsProperties prop = new ApsProperties();
prop.put("contentId", contentId);
prop.put(ContentFeedbackWidgetAction.WIDGET_PARAM_COMMENT_ACTIVE, "true");
prop.put(ContentFeedbackWidgetAction.WIDGET_PARAM_COMMENT_MODERATED, "false");
prop.put(ContentFeedbackWidgetAction.WIDGET_PARAM_COMMENT_ANONYMOUS, "false");
prop.put(ContentFeedbackWidgetAction.WIDGET_PARAM_RATE_COMMENT, "true");
prop.put(ContentFeedbackWidgetAction.WIDGET_PARAM_RATE_CONTENT, "true");
showlet.setConfig(prop);
showlet.setPublishedContent(contentId);
RequestContext e = new RequestContext();
e.addExtraParam(SystemConstants.EXTRAPAR_CURRENT_WIDGET, showlet);