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.core.Content;
 import  info.magnolia.cms.i18n.Messages;
 import  info.magnolia.context.MgnlContext;
 import  info.magnolia.module.ModuleRegistry;
 import java.util.Map;
A column of checkboxes.

$Id: 4282 2013-08-22 11:06:56Z lucaboati $
 public class CheckboxGridColumnType implements GridColumnType

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

     public String drawSupportHtml(String propertyNameint colIndexMap colmap, Messages msgs)
         return .;

     public String drawColumnJs(String propertyNameint colIndexMap colMap, Messages msgs)
         String header = (StringcolMap.get("header");
         return "(function(){\n"
             + "var cc = new Ext.grid.CheckColumn({"
             + "header: '"
             + StringEscapeUtils.escapeJavaScript(msgs.getWithDefault(headerheader))
             + "',"
             + "dataIndex: '"
             + colIndex
             + "',"
             + "width: 40"
             + "});\n"
             + "plugins.push(cc);"
             + "return cc;\n"
             + "})()";

     public void processColumnOnLoad(String[] column, Content colConfigString propertyName, Content storageNode)
         // TODO Auto-generated method stub

     public void processColumnOnSave(String[] column, Content colConfigString propertyName, Content parentNode)
         throws RepositoryException, AccessDeniedException
New to GrepCode? Check out our FAQ X