}
@Override
protected String extractInitConfig() {
if (null != this.getWidget()) return SUCCESS;
Widget showlet = this.getCurrentPage().getWidgets()[this.getFrame()];
Logger log = ApsSystemUtils.getLogger();
if (null == showlet) {
try {
showlet = this.createNewShowlet();
//for ContentFeedbackWidgetAction
IContentFeedbackConfig systemConfig = this.getContentFeedbackManager().getConfig();
String value = systemConfig.getComment();
if (null != value && value.equalsIgnoreCase("true")) showlet.getConfig().setProperty(WIDGET_PARAM_COMMENT_ACTIVE, value);
value = systemConfig.getAnonymousComment();
if (null != value && value.equalsIgnoreCase("true")) showlet.getConfig().setProperty(WIDGET_PARAM_COMMENT_ANONYMOUS, value);
value = systemConfig.getModeratedComment();
if (null != value && value.equalsIgnoreCase("true")) showlet.getConfig().setProperty(WIDGET_PARAM_COMMENT_MODERATED, value);
value = systemConfig.getRateContent();
if (null != value && value.equalsIgnoreCase("true")) showlet.getConfig().setProperty(WIDGET_PARAM_RATE_CONTENT, value);
value = systemConfig.getRateComment();
if (null != value && value.equalsIgnoreCase("true")) showlet.getConfig().setProperty(WIDGET_PARAM_RATE_COMMENT, value);
//---
} catch (Throwable t) {
ApsSystemUtils.logThrowable(t, this, NONE);
//TODO METTI MESSAGGIO DI ERRORE NON PREVISO... Vai in pageTree con messaggio di errore Azione non prevista o cosa del genere
this.addActionError(this.getText("Message.userNotAllowed"));
return "pageTree";
}
log.info("Configurating new Widget " + this.getShowletTypeCode() + " - Page " + this.getPageCode() + " - Frame " + this.getFrame());
} else {
log.info("Edit widget config " + showlet.getType().getCode() + " - Page " + this.getPageCode() + " - Frame " + this.getFrame());
showlet = this.createCloneFrom(showlet);
}
this.setShowlet(showlet);
return SUCCESS;
}