@Override
    public String getDialogHtmlEnd(CmsObject cms, I_CmsWidgetDialog widgetDialog, I_CmsWidgetParameter param) {

        String id = param.getId();
        StringBuffer result = new StringBuffer(256);

        // get the select box options
        List<CmsSelectWidgetOption> options = parseSelectOptions(cms, widgetDialog, param);

        if (options.size() > 0) {
            // create combo div
            result.append("<div class=\"widgetcombo\" id=\"combo");
            result.append(id);
            result.append("\">\n");

            int count = 0;
            Iterator<CmsSelectWidgetOption> i = options.iterator();
            while (i.hasNext()) {
                CmsSelectWidgetOption option = i.next();
                String itemId = new StringBuffer(64).append("ci").append(id).append('.').append(count).toString();
                // create the link around value
                result.append("\t<a href=\"javascript:setComboValue(\'");
                result.append(id);
                result.append("\', \'");
                result.append(itemId);
                result.append("\')\" name=\"");
                result.append(itemId);
                result.append("\" id=\"");
                result.append(itemId);
                result.append("\"");
                if (option.getHelp() != null) {
                    // create help text mousevent attributes
                    // can't use method in CmsEncoder because we need to keep < > for HTML in help text
                    String locValue = CmsStringUtil.substitute(option.getHelp(), "\"", "&quot;");
                    result.append(
                        getJsHelpMouseHandler(widgetDialog, itemId, CmsStringUtil.escapeJavaScript(locValue)));
                }
                result.append(">");
                result.append(option.getValue());
                result.append("</a>\n");
                count++;
            }

            // close combo div
            result.append("</div>\n");

            if (widgetDialog.useNewStyle()) {
                // create help texts for the values in admin view
                count = 0;
                i = options.iterator();
                while (i.hasNext()) {
                    CmsSelectWidgetOption option = i.next();
                    if (option.getHelp() != null) {
                        // help text is optional
                        String itemId = new StringBuffer(64).append("ci").append(id).append('.').append(
                            count).toString();
                        result.append("<div class=\"help\" id=\"help");
                        result.append(itemId);
                        result.append("\"");
                        result.append(getJsHelpMouseHandler(widgetDialog, itemId, itemId));
                        result.append(">");
                        result.append(option.getHelp());
                        result.append("</div>\n");
                        count++;
                    }
                }
            }
        }

        // return the icon help text from super class
        result.append(super.getDialogHtmlEnd(cms, widgetDialog, param));
        return result.toString();
    }
@ Override public String getDialogHtmlEnd ( CmsObject cms , I_CmsWidgetDialog widgetDialog , I_CmsWidgetParameter param ) { String id = param . getId ( ) ; StringBuffer result = new StringBuffer ( 256 ) ; List < CmsSelectWidgetOption > options = parseSelectOptions ( cms , widgetDialog , param ) ; if ( options . size ( ) > 0 ) { result . append ( "<div class=\"widgetcombo\" id=\"combo" ) ; result . append ( id ) ; result . append ( "\">\n" ) ; int count = 0 ; Iterator < CmsSelectWidgetOption > i = options . iterator ( ) ; while ( i . hasNext ( ) ) { CmsSelectWidgetOption option = i . next ( ) ; String itemId = new StringBuffer ( 64 ) . append ( "ci" ) . append ( id ) . append ( '.' ) . append ( count ) . toString ( ) ; result . append ( "\t<a href=\"javascript:setComboValue(\'" ) ; result . append ( id ) ; result . append ( "\', \'" ) ; result . append ( itemId ) ; result . append ( "\')\" name=\"" ) ; result . append ( itemId ) ; result . append ( "\" id=\"" ) ; result . append ( itemId ) ; result . append ( "\"" ) ; if ( option . getHelp ( ) != null ) { String locValue = CmsStringUtil . substitute ( option . getHelp ( ) , "\"" , "&quot;" ) ; result . append ( getJsHelpMouseHandler ( widgetDialog , itemId , CmsStringUtil . escapeJavaScript ( locValue ) ) ) ; } result . append ( ">" ) ; result . append ( option . getValue ( ) ) ; result . append ( "</a>\n" ) ; count ++ ; } result . append ( "</div>\n" ) ; if ( widgetDialog . useNewStyle ( ) ) { count = 0 ; i = options . iterator ( ) ; while ( i . hasNext ( ) ) { CmsSelectWidgetOption option = i . next ( ) ; if ( option . getHelp ( ) != null ) { String itemId = new StringBuffer ( 64 ) . append ( "ci" ) . append ( id ) . append ( '.' ) . append ( count ) . toString ( ) ; result . append ( "<div class=\"help\" id=\"help" ) ; result . append ( itemId ) ; result . append ( "\"" ) ; result . append ( getJsHelpMouseHandler ( widgetDialog , itemId , itemId ) ) ; result . append ( ">" ) ; result . append ( option . getHelp ( ) ) ; result . append ( "</div>\n" ) ; count ++ ; } } } } result . append ( super . getDialogHtmlEnd ( cms , widgetDialog , param ) ) ; return result . toString ( ) ; }
@see org.opencms.widgets.A_CmsWidget#getDialogHtmlEnd(org.opencms.file.CmsObject, org.opencms.widgets.I_CmsWidgetDialog, org.opencms.widgets.I_CmsWidgetParameter)