Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Controls module for Magnolia CMS ( Copyright(C) 2008-2013, Openmind S.r.l. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <>.
package net.sourceforge.openutils.mgnlcontrols.configuration;
import  info.magnolia.cms.i18n.Messages;
import  info.magnolia.context.MgnlContext;
import  info.magnolia.module.ModuleRegistry;
A column of links: values can be edited selecting an internal link from standard magnolia dialog.

$Id: 4282 2013-08-22 11:06:56Z lucaboati $

    public String getHeadSnippet()
        return "<script type=\"text/javascript\" src=\""
            + MgnlContext.getContextPath()
            + "/.resources/controls/"
            + ModuleRegistry.Factory.getInstance().getDefinition("controls").getVersion()
            + "/js/LinkField.js\"></script>";

    protected void addColumnData(Map<StringStringcolumnString propertyNameint colIndexMap colMap,
        Messages msgs)
        List<Stringoptions = new ArrayList<String>();
        if (!StringUtils.isEmpty((StringcolMap.get("repository")))
            options.add("repository: '" + colMap.get("repository") + "'");
        if (!StringUtils.isEmpty((StringcolMap.get("extension")))
            options.add("extension: '" + colMap.get("extension") + "'");
        column.put("editor""new Ed(new LinkField({" + StringUtils.join(options",") + "}))");
New to GrepCode? Check out our FAQ X