Package org.opencms.i18n

Examples of org.opencms.i18n.CmsMessages


     *
     * @return the HTML output String for the edit properties form
     */
    public String buildEditForm() {

        CmsMessages messages = Messages.get().getBundle(getLocale());
        StringBuffer result = new StringBuffer();

        // check if the properties are editable
        boolean editable = isEditable();

        // create the column heads
        result.append("<table border=\"0\">\n");
        result.append("<tr>\n");
        result.append("\t<td class=\"textbold\">");
        result.append(messages.key(Messages.GUI_PROPERTY_0));
        result.append("</td>\n");
        result.append("\t<td class=\"textbold maxwidth\">");
        result.append(key(Messages.GUI_PROPERTY_VALUE_0));
        result.append("</td>\n");
        result.append("\t<td class=\"textbold\" style=\"white-space: nowrap;\">");
View Full Code Here


     * @param options the option list
     * @param values the value list
     */
    private void addCurrentTemplate(String currentTemplate, List<ListItem> options) {

        CmsMessages messages = Messages.get().getBundle(getLocale());

        // template was not found in regular template folders, add current template value
        if (CmsStringUtil.isEmpty(currentTemplate)) {
            // current template not available, add "please select" value
          String name = "--- " + messages.key(org.opencms.workplace.editors.Messages.GUI_PLEASE_SELECT_0) + " ---";
            options.add(0, new ListItem(name, name, true));
        } else {
            // current template was set to some value, add this value to the selection
            String name = null;
            try {
                // read the title of the current template
                name = getCms().readPropertyObject(currentTemplate, CmsPropertyDefinition.PROPERTY_TITLE, false).getValue();
            } catch (CmsException e) {
                // ignore this exception - the title for this template was not readable
                if (LOG.isInfoEnabled()) {
                    LOG.info(messages.key(org.opencms.workplace.editors.Messages.LOG_READ_TITLE_PROP_FAILED_1, currentTemplate), e);
                }
            }
            if (name == null) {
                name = currentTemplate;
            }
View Full Code Here

TOP

Related Classes of org.opencms.i18n.CmsMessages

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.