/** * @see org.opencms.widgets.I_CmsWidget#getDialogInitCall(org.opencms.file.CmsObject, org.opencms.widgets.I_CmsWidgetDialog) */ @Override public String getDialogInitCall(CmsObject cms, I_CmsWidgetDialog widgetDialog) { return getEditorWidget(cms, widgetDialog).getDialogInitCall(cms, widgetDialog); }
/** * @see org.opencms.widgets.I_CmsWidget#getDialogInitCall(org.opencms.file.CmsObject, org.opencms.widgets.I_CmsWidgetDialog) */ @Override public String getDialogInitCall(CmsObject cms, I_CmsWidgetDialog widgetDialog) { return getEditorWidget(cms, widgetDialog).getDialogInitCall(cms, widgetDialog); }
/** * Generates the javascript initialization calls for the used widgets in the editor form.<p> * * @return the javascript initialization calls for the used widgets * @throws JspException if including the error page fails */ public String getXmlEditorInitCalls() throws JspException { StringBuffer result = new StringBuffer(512); try { // iterate over unique widgets from collector Iterator i = getWidgetCollector().getUniqueWidgets().iterator(); while (i.hasNext()) { I_CmsWidget widget = (I_CmsWidget)i.next(); result.append(widget.getDialogInitCall(getCms(), this)); } } catch (Exception e) { showErrorPage(e); } return result.toString(); }
/** * Generates the JavaScript init calls for the used widgets.<p> * * @return the JavaScript init calls for the used widgets * * @throws JspException the JavaScript init calls for the used widgets */ public String getWidgetInitCalls() throws JspException { StringBuffer result = new StringBuffer(32); try { // iterate over unique widgets from collector Iterator i = getWidgets().iterator(); Set set = new HashSet(); while (i.hasNext()) { I_CmsWidget widget = ((CmsWidgetDialogParameter)i.next()).getWidget(); if (!set.contains(widget)) { result.append(widget.getDialogInitCall(getCms(), this)); set.add(widget); } } } catch (Throwable e) { includeErrorpage(this, e); } return result.toString(); }
/** * Generates the JavaScript initialization calls for the used widgets in the editor form.<p> * * @return the JavaScript initialization calls for the used widgets * @throws JspException if including the error page fails */ public String getXmlEditorInitCalls() throws JspException { StringBuffer result = new StringBuffer(512); try { // iterate over unique widgets from collector Iterator<I_CmsWidget> i = getWidgetCollector().getUniqueWidgets().iterator(); while (i.hasNext()) { I_CmsWidget widget = i.next(); result.append(widget.getDialogInitCall(getCms(), this)); } } catch (Exception e) { showErrorPage(e); } return result.toString(); }
/** * Generates the JavaScript init calls for the used widgets.<p> * * @return the JavaScript init calls for the used widgets * * @throws JspException the JavaScript init calls for the used widgets */ public String getWidgetInitCalls() throws JspException { StringBuffer result = new StringBuffer(32); try { // iterate over unique widgets from collector Iterator<CmsWidgetDialogParameter> i = getWidgets().iterator(); Set<I_CmsWidget> set = new HashSet<I_CmsWidget>(); while (i.hasNext()) { I_CmsWidget widget = i.next().getWidget(); if (!set.contains(widget)) { result.append(widget.getDialogInitCall(getCms(), this)); set.add(widget); } } } catch (Throwable e) { includeErrorpage(this, e); } return result.toString(); }