/** * Generates the HTML for the end of the widget dialog.<p> * * This HTML includes additional components, for example the <div> * tags containing the help texts.<p> * * @return the HTML for the end of the widget dialog */ public String getWidgetHtmlEnd() { StringBuffer result = new StringBuffer(32); // iterate over unique widgets from collector Iterator i = getWidgets().iterator(); while (i.hasNext()) { CmsWidgetDialogParameter param = (CmsWidgetDialogParameter)i.next(); result.append(param.getWidget().getDialogHtmlEnd(getCms(), this, param)); } return result.toString(); }
/** * Returns the widget HTML code for the given parameter.<p> * * @param param the name (id) of the parameter to get the widget HTML for * * @return the widget HTML code for the given parameter */ protected String getWidget(CmsWidgetDialogParameter param) { if (param != null) { return param.getWidget().getDialogWidget(getCms(), this, param); } return null; }
/** * Generates the HTML for the end of the widget dialog.<p> * * This HTML includes additional components, for example the <div> * tags containing the help texts.<p> * * @return the HTML for the end of the widget dialog */ public String getWidgetHtmlEnd() { StringBuffer result = new StringBuffer(32); // iterate over unique widgets from collector Iterator<CmsWidgetDialogParameter> i = getWidgets().iterator(); while (i.hasNext()) { CmsWidgetDialogParameter param = i.next(); result.append(param.getWidget().getDialogHtmlEnd(getCms(), this, param)); } return result.toString(); }
/** * Returns the widget HTML code for the given parameter.<p> * * @param param the name (id) of the parameter to get the widget HTML for * * @return the widget HTML code for the given parameter */ protected String getWidget(CmsWidgetDialogParameter param) { if (param != null) { return param.getWidget().getDialogWidget(getCms(), this, param); } return null; }
/** * 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 HTML include tags for external JavaScripts files of the used widgets.<p> * * @return the HTML include tags for external JavaScripts files of the used widgets * * @throws JspException if an error occurs during JavaScript generation */ public String getWidgetIncludes() 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.getDialogIncludes(getCms(), this)); result.append('\n'); set.add(widget); } } } catch (Throwable e) { includeErrorpage(this, e); } return result.toString(); }
/** * Generates the JavaScript initialization methods for the used widgets.<p> * * @return the JavaScript initialization methods for the used widgets * * @throws JspException if an error occurs during JavaScript generation */ public String getWidgetInitMethods() 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.getDialogInitMethod(getCms(), this)); set.add(widget); } } } catch (Throwable e) { includeErrorpage(this, e); } return result.toString(); }
/** * Generates the JavaScript initialization methods for the used widgets.<p> * * @return the JavaScript initialization methods for the used widgets * * @throws JspException if an error occurs during JavaScript generation */ public String getWidgetInitMethods() 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.getDialogInitMethod(getCms(), this)); set.add(widget); } } } catch (Throwable e) { includeErrorpage(this, 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(); }
/** * Generates the HTML include tags for external JavaScripts files of the used widgets.<p> * * @return the HTML include tags for external JavaScripts files of the used widgets * * @throws JspException if an error occurs during JavaScript generation */ public String getWidgetIncludes() 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.getDialogIncludes(getCms(), this)); result.append('\n'); set.add(widget); } } } catch (Throwable e) { includeErrorpage(this, e); } return result.toString(); }
base.m_defaultValue, base.getName(), base.getWidget(), base.getDialogPage(), base.getMinOccurs(),
base.m_defaultValue, base.getName(), base.getWidget(), base.getDialogPage(), base.getMinOccurs(),
/** * @see org.opencms.workplace.CmsWidgetDialog#dialogButtonsCustom() */ @Override public String dialogButtonsCustom() { if (m_advanced) { return super.dialogButtonsCustom(); } boolean onlyDisplay = true; Iterator it = getWidgets().iterator(); while (it.hasNext()) { CmsWidgetDialogParameter wdp = (CmsWidgetDialogParameter)it.next(); if (!(wdp.getWidget() instanceof CmsDisplayWidget)) { onlyDisplay = false; break; } } if (!onlyDisplay && !ACTION_IMPORT.equals(getParamAction())) { // this is a single page dialog, create common buttons return dialogButtons( new int[] {BUTTON_OK, BUTTON_CANCEL, BUTTON_ADVANCED}, new String[] {"", "", " onclick=\"submitAction('" + ACTION_IMPORT + "', form);\""}); } // this is a display only dialog return ""; }
while (it.hasNext()) { CmsWidgetDialogParameter wdp = it.next(); if (!(wdp.getWidget() instanceof CmsDisplayWidget)) { onlyDisplay = false; break;
while (it.hasNext()) { CmsWidgetDialogParameter wdp = (CmsWidgetDialogParameter)it.next(); if (!(wdp.getWidget() instanceof CmsDisplayWidget)) { onlyDisplay = false; break;
/** * Create a new Widget parameter.<p> * * @param base the base of the parameter * @param index the index of this parameter in the list */ public CmsWidgetDialogParameter(CmsWidgetDialogParameter base, int index) { this( null, base.m_defaultValue, base.getName(), base.getWidget(), base.getDialogPage(), base.getMinOccurs(), base.getMaxOccurs(), index); m_baseObject = base.m_baseObject; m_baseObjectProperty = base.m_baseObjectProperty; m_baseCollection = base.m_baseCollection; m_prefix = base.m_prefix; }
/** * Create a new Widget parameter.<p> * * @param base the base of the parameter * @param index the index of this parameter in the list */ public CmsWidgetDialogParameter(CmsWidgetDialogParameter base, int index) { this( null, base.m_defaultValue, base.getName(), base.getWidget(), base.getDialogPage(), base.getMinOccurs(), base.getMaxOccurs(), index); m_baseObject = base.m_baseObject; m_baseObjectProperty = base.m_baseObjectProperty; m_baseCollection = base.m_baseCollection; m_prefix = base.m_prefix; }
CmsWidgetDialogParameter param = new CmsWidgetDialogParameter(base, params.size(), j); param.setKeyPrefix(m_prefix); base.getWidget().setEditorValue(getCms(), processedParameters, this, param); params.add(param);
CmsWidgetDialogParameter param = new CmsWidgetDialogParameter(base, params.size(), j); param.setKeyPrefix(m_prefix); base.getWidget().setEditorValue(getCms(), processedParameters, this, param); params.add(param);
CmsWidgetDialogParameter param = new CmsWidgetDialogParameter(base, params.size(), j); param.setKeyPrefix(KEY_PREFIX); base.getWidget().setEditorValue(getCms(), processedParameters, this, param); params.add(param);