From: <die...@us...> - 2013-07-05 14:37:42
|
Revision: 4277 http://openutils.svn.sourceforge.net/openutils/?rev=4277&view=rev Author: diego_schivo Date: 2013-07-05 14:37:39 +0000 (Fri, 05 Jul 2013) Log Message: ----------- Merged revisions 4275-4276 via svnmerge from svn+ssh://die...@sv.../p/openutils/code/magnoliamodules/trunk ........ r4275 | diego_schivo | 2013-06-28 17:32:39 +0200 (Fri, 28 Jun 2013) | 1 line CONTROLS-54 dependentSelectListAndRadioGroup.ftl ........ r4276 | diego_schivo | 2013-07-05 16:16:58 +0200 (Fri, 05 Jul 2013) | 1 line CONTROLS-55 Button set control ........ Revision Links: -------------- http://openutils.svn.sourceforge.net/openutils/?rev=4275&view=rev http://openutils.svn.sourceforge.net/openutils/?rev=4276&view=rev Added Paths: ----------- magnoliamodules/branches/magnolia44/openutils-mgnlcontrols/src/main/java/net/sourceforge/openutils/mgnlcontrols/dialog/DialogButtonSet.java magnoliamodules/branches/magnolia44/openutils-mgnlcontrols/src/main/resources/mgnl-bootstrap/controls/config.modules.controls.controls.controls-checkbox.xml magnoliamodules/branches/magnolia44/openutils-mgnlcontrols/src/main/resources/mgnl-bootstrap/controls/config.modules.controls.controls.controls-checkboxSwitch.xml magnoliamodules/branches/magnolia44/openutils-mgnlcontrols/src/main/resources/mgnl-bootstrap/controls/config.modules.controls.controls.controls-radio.xml magnoliamodules/branches/magnolia44/openutils-mgnlcontrols/src/main/resources/mgnl-bootstrap-samples/controls/config.modules.controls.dialogs.samples-buttonSet.xml magnoliamodules/branches/magnolia44/openutils-mgnlcontrols/src/main/resources/mgnl-bootstrap-samples/controls/config.modules.controls.templates.components.samples-buttonSet.xml magnoliamodules/branches/magnolia44/openutils-mgnlcontrols/src/main/resources/mgnl-files/templates/samples-controls/paragraph-buttonSet.jsp Property Changed: ---------------- magnoliamodules/branches/magnolia44/ Index: magnoliamodules/branches/magnolia44 =================================================================== --- magnoliamodules/branches/magnolia44 2013-07-05 14:16:58 UTC (rev 4276) +++ magnoliamodules/branches/magnolia44 2013-07-05 14:37:39 UTC (rev 4277) Property changes on: magnoliamodules/branches/magnolia44 ___________________________________________________________________ Modified: svnmerge-integrated ## -1 +1 ## -/magnoliamodules/trunk:1-3778,4049-4053,4264-4266,4268,4270 +/magnoliamodules/trunk:1-3778,4049-4053,4264-4266,4268,4270,4275-4276 \ No newline at end of property Copied: magnoliamodules/branches/magnolia44/openutils-mgnlcontrols/src/main/java/net/sourceforge/openutils/mgnlcontrols/dialog/DialogButtonSet.java (from rev 4276, magnoliamodules/trunk/openutils-mgnlcontrols/src/main/java/net/sourceforge/openutils/mgnlcontrols/dialog/DialogButtonSet.java) =================================================================== --- magnoliamodules/branches/magnolia44/openutils-mgnlcontrols/src/main/java/net/sourceforge/openutils/mgnlcontrols/dialog/DialogButtonSet.java (rev 0) +++ magnoliamodules/branches/magnolia44/openutils-mgnlcontrols/src/main/java/net/sourceforge/openutils/mgnlcontrols/dialog/DialogButtonSet.java 2013-07-05 14:37:39 UTC (rev 4277) @@ -0,0 +1,257 @@ +/** + * + * Controls module for Magnolia CMS (http://www.openmindlab.com/lab/products/controls.html) + * Copyright(C) 2008-2012, Openmind S.r.l. http://www.openmindonline.it + * + * 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 <http://www.gnu.org/licenses/>. + */ + +package net.sourceforge.openutils.mgnlcontrols.dialog; + +import info.magnolia.cms.beans.config.ContentRepository; +import info.magnolia.cms.core.Content; +import info.magnolia.cms.gui.control.Button; +import info.magnolia.cms.gui.control.ControlImpl; +import info.magnolia.cms.util.ContentUtil; +import info.magnolia.cms.util.NodeDataUtil; + +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; +import java.util.Map; + +import javax.jcr.RepositoryException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.lang.BooleanUtils; +import org.apache.commons.lang.ObjectUtils; +import org.apache.commons.lang.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.google.common.base.Function; +import com.google.common.collect.Iterators; + + +public class DialogButtonSet extends info.magnolia.cms.gui.dialog.DialogButtonSet +{ + + /** + * Logger. + */ + private static Logger log = LoggerFactory.getLogger(DialogButtonSet.class); + + private OptionsProvider optionsProvider = new OptionsProvider.DefaultImpl();; + + private boolean initHack; + + @Override + public void init(HttpServletRequest request, HttpServletResponse response, Content websiteNode, Content configNode) + throws RepositoryException + { + // super.init(request, response, websiteNode, configNode); + // String optionsProviderClass = getConfigValue("optionsProvider"); + String optionsProviderClass = NodeDataUtil.getString(configNode, "optionsProvider"); + try + { + optionsProvider = (OptionsProvider) Class.forName(optionsProviderClass).newInstance(); + } + catch (Throwable e) + { + log.error(e.getMessage(), e); + } + initHack = true; + super.init(request, response, websiteNode, configNode); + initHack = false; + } + + @Override + public String getConfigValue(String key, String nullValue) + { + String val = super.getConfigValue(key, nullValue); + if (initHack && StringUtils.equals(key, "selectType") && StringUtils.equals(val, nullValue)) + { + val = StringUtils.removeStart(val, "controls-"); + } + return val; + } + + @Override + public void setOptions(Content configNode, boolean setDefaultSelected) + { + List options = new ArrayList(); + try + { + Iterator<Option> it = optionsProvider.getOptions(this, configNode); + while (it.hasNext()) + { + Option o = it.next(); + Button button = new Button(this.getName(), o.getValue()); + button.setLabel(o.getLabel()); + if (StringUtils.isNotEmpty(o.getIconSrc())) + { + button.setIconSrc(o.getIconSrc()); + } + if (setDefaultSelected && o.isSelected()) + { + button.setState(ControlImpl.BUTTONSTATE_PUSHED); + } + options.add(button); + } + } + catch (Exception e) + { + if (log.isDebugEnabled()) + { + log.debug("Exception caught: " + e.getMessage(), e); + } + } + this.setOptions(options); + } + + public static interface Option + { + + String getValue(); + + String getLabel(); + + String getIconSrc(); + + boolean isSelected(); + + public static class ContentAdapter implements Option + { + + private final Content node; + + private final String valueNodeData; + + private final String labelNodeData; + + public ContentAdapter(Content node, String valueNodeData, String labelNodeData) + { + this.node = node; + this.valueNodeData = valueNodeData; + this.labelNodeData = labelNodeData; + } + + public String getValue() + { + return NodeDataUtil.getString(node, valueNodeData); + } + + public String getLabel() + { + return NodeDataUtil.getString(node, labelNodeData); + } + + public String getIconSrc() + { + return node.getNodeData("iconSrc").getString(); + } + + public boolean isSelected() + { + return node.getNodeData("selected").getBoolean(); + } + } + + public static class MapAdapter implements Option + { + + private final Map map; + + private final String valueNodeData; + + private final String labelNodeData; + + public MapAdapter(Map map, String valueNodeData, String labelNodeData) + { + this.map = map; + this.valueNodeData = valueNodeData; + this.labelNodeData = labelNodeData; + } + + public String getValue() + { + return ObjectUtils.toString(map.get(valueNodeData)); + } + + public String getLabel() + { + return ObjectUtils.toString(map.get(labelNodeData)); + } + + public String getIconSrc() + { + return ObjectUtils.toString(map.get("iconSrc")); + } + + public boolean isSelected() + { + return BooleanUtils.toBoolean(ObjectUtils.toString(map.get("selected"))); + } + } + } + + public interface OptionsProvider + { + + Iterator<Option> getOptions(DialogButtonSet control, Content configNode) throws Exception; + + public static class DefaultImpl implements OptionsProvider + { + + public Iterator<Option> getOptions(final DialogButtonSet control, Content configNode) throws Exception + { + // info.magnolia.cms.gui.dialog.DialogButtonSet.getOptionNodes(Content) + Content optionsNode = null; + + if (configNode.hasContent("options")) + { + optionsNode = configNode.getContent("options"); + } + else + { + String repository = control.getConfigValue("repository", ContentRepository.WEBSITE); + String path = control.getConfigValue("path"); + if (StringUtils.isNotEmpty(path)) + { + optionsNode = ContentUtil.getContent(repository, path); + } + } + + if (optionsNode != null) + { + return Iterators.transform( + ContentUtil.getAllChildren(optionsNode).iterator(), + new Function<Content, Option>() + { + + public Option apply(Content input) + { + return new Option.ContentAdapter(input, control + .getConfigValue("valueNodeData", "value"), control.getConfigValue( + "labelNodeData", + "label")); + } + }); + } + return new ArrayList().iterator(); + } + } + } +} Copied: magnoliamodules/branches/magnolia44/openutils-mgnlcontrols/src/main/resources/mgnl-bootstrap/controls/config.modules.controls.controls.controls-checkbox.xml (from rev 4276, magnoliamodules/trunk/openutils-mgnlcontrols/src/main/resources/mgnl-bootstrap/controls/config.modules.controls.controls.controls-checkbox.xml) =================================================================== --- magnoliamodules/branches/magnolia44/openutils-mgnlcontrols/src/main/resources/mgnl-bootstrap/controls/config.modules.controls.controls.controls-checkbox.xml (rev 0) +++ magnoliamodules/branches/magnolia44/openutils-mgnlcontrols/src/main/resources/mgnl-bootstrap/controls/config.modules.controls.controls.controls-checkbox.xml 2013-07-05 14:37:39 UTC (rev 4277) @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sv:node sv:name="controls-checkbox" xmlns:sv="http://www.jcp.org/jcr/sv/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <sv:property sv:name="jcr:primaryType" sv:type="Name"> + <sv:value>mgnl:contentNode</sv:value> + </sv:property> + <sv:property sv:name="jcr:mixinTypes" sv:type="Name" sv:multiple="true"> + <sv:value>mix:lockable</sv:value> + </sv:property> + <sv:property sv:name="jcr:uuid" sv:type="String"> + <sv:value>5bd47675-b1a3-48b4-9867-76d910fa2fbb</sv:value> + </sv:property> + <sv:property sv:name="class" sv:type="String"> + <sv:value>net.sourceforge.openutils.mgnlcontrols.dialog.DialogButtonSet</sv:value> + </sv:property> + <sv:property sv:name="jcr:createdBy" sv:type="String"> + <sv:value>admin</sv:value> + </sv:property> + <sv:node sv:name="MetaData"> + <sv:property sv:name="jcr:primaryType" sv:type="Name"> + <sv:value>mgnl:metaData</sv:value> + </sv:property> + <sv:property sv:name="jcr:createdBy" sv:type="String"> + <sv:value>admin</sv:value> + </sv:property> + <sv:property sv:name="mgnl:authorid" sv:type="String"> + <sv:value>superuser</sv:value> + </sv:property> + <sv:property sv:name="mgnl:creationdate" sv:type="Date"> + <sv:value>2008-06-07T18:15:12.496+02:00</sv:value> + </sv:property> + <sv:property sv:name="mgnl:lastmodified" sv:type="Date"> + <sv:value>2013-07-05T10:20:11.784+02:00</sv:value> + </sv:property> + </sv:node> +</sv:node> Copied: magnoliamodules/branches/magnolia44/openutils-mgnlcontrols/src/main/resources/mgnl-bootstrap/controls/config.modules.controls.controls.controls-checkboxSwitch.xml (from rev 4276, magnoliamodules/trunk/openutils-mgnlcontrols/src/main/resources/mgnl-bootstrap/controls/config.modules.controls.controls.controls-checkboxSwitch.xml) =================================================================== --- magnoliamodules/branches/magnolia44/openutils-mgnlcontrols/src/main/resources/mgnl-bootstrap/controls/config.modules.controls.controls.controls-checkboxSwitch.xml (rev 0) +++ magnoliamodules/branches/magnolia44/openutils-mgnlcontrols/src/main/resources/mgnl-bootstrap/controls/config.modules.controls.controls.controls-checkboxSwitch.xml 2013-07-05 14:37:39 UTC (rev 4277) @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sv:node sv:name="controls-checkboxSwitch" xmlns:sv="http://www.jcp.org/jcr/sv/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <sv:property sv:name="jcr:primaryType" sv:type="Name"> + <sv:value>mgnl:contentNode</sv:value> + </sv:property> + <sv:property sv:name="jcr:mixinTypes" sv:type="Name" sv:multiple="true"> + <sv:value>mix:lockable</sv:value> + </sv:property> + <sv:property sv:name="jcr:uuid" sv:type="String"> + <sv:value>a3649f86-0bcd-4129-b569-f7f3c0c76b1b</sv:value> + </sv:property> + <sv:property sv:name="class" sv:type="String"> + <sv:value>net.sourceforge.openutils.mgnlcontrols.dialog.DialogButtonSet</sv:value> + </sv:property> + <sv:property sv:name="jcr:createdBy" sv:type="String"> + <sv:value>admin</sv:value> + </sv:property> + <sv:node sv:name="MetaData"> + <sv:property sv:name="jcr:primaryType" sv:type="Name"> + <sv:value>mgnl:metaData</sv:value> + </sv:property> + <sv:property sv:name="jcr:createdBy" sv:type="String"> + <sv:value>admin</sv:value> + </sv:property> + <sv:property sv:name="mgnl:activated" sv:type="Boolean"> + <sv:value>false</sv:value> + </sv:property> + <sv:property sv:name="mgnl:authorid" sv:type="String"> + <sv:value>superuser</sv:value> + </sv:property> + <sv:property sv:name="mgnl:creationdate" sv:type="Date"> + <sv:value>2008-06-07T18:15:12.496+02:00</sv:value> + </sv:property> + <sv:property sv:name="mgnl:lastmodified" sv:type="Date"> + <sv:value>2013-07-05T15:42:01.709+02:00</sv:value> + </sv:property> + </sv:node> +</sv:node> Copied: magnoliamodules/branches/magnolia44/openutils-mgnlcontrols/src/main/resources/mgnl-bootstrap/controls/config.modules.controls.controls.controls-radio.xml (from rev 4276, magnoliamodules/trunk/openutils-mgnlcontrols/src/main/resources/mgnl-bootstrap/controls/config.modules.controls.controls.controls-radio.xml) =================================================================== --- magnoliamodules/branches/magnolia44/openutils-mgnlcontrols/src/main/resources/mgnl-bootstrap/controls/config.modules.controls.controls.controls-radio.xml (rev 0) +++ magnoliamodules/branches/magnolia44/openutils-mgnlcontrols/src/main/resources/mgnl-bootstrap/controls/config.modules.controls.controls.controls-radio.xml 2013-07-05 14:37:39 UTC (rev 4277) @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sv:node sv:name="controls-radio" xmlns:sv="http://www.jcp.org/jcr/sv/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <sv:property sv:name="jcr:primaryType" sv:type="Name"> + <sv:value>mgnl:contentNode</sv:value> + </sv:property> + <sv:property sv:name="jcr:mixinTypes" sv:type="Name" sv:multiple="true"> + <sv:value>mix:lockable</sv:value> + </sv:property> + <sv:property sv:name="jcr:uuid" sv:type="String"> + <sv:value>9dba557a-a017-484b-b6c7-9d981f473109</sv:value> + </sv:property> + <sv:property sv:name="class" sv:type="String"> + <sv:value>net.sourceforge.openutils.mgnlcontrols.dialog.DialogButtonSet</sv:value> + </sv:property> + <sv:property sv:name="jcr:createdBy" sv:type="String"> + <sv:value>admin</sv:value> + </sv:property> + <sv:node sv:name="MetaData"> + <sv:property sv:name="jcr:primaryType" sv:type="Name"> + <sv:value>mgnl:metaData</sv:value> + </sv:property> + <sv:property sv:name="jcr:createdBy" sv:type="String"> + <sv:value>admin</sv:value> + </sv:property> + <sv:property sv:name="mgnl:activated" sv:type="Boolean"> + <sv:value>false</sv:value> + </sv:property> + <sv:property sv:name="mgnl:authorid" sv:type="String"> + <sv:value>superuser</sv:value> + </sv:property> + <sv:property sv:name="mgnl:creationdate" sv:type="Date"> + <sv:value>2008-06-07T18:15:12.496+02:00</sv:value> + </sv:property> + <sv:property sv:name="mgnl:lastmodified" sv:type="Date"> + <sv:value>2013-07-05T15:41:54.814+02:00</sv:value> + </sv:property> + </sv:node> +</sv:node> Copied: magnoliamodules/branches/magnolia44/openutils-mgnlcontrols/src/main/resources/mgnl-bootstrap-samples/controls/config.modules.controls.dialogs.samples-buttonSet.xml (from rev 4276, magnoliamodules/trunk/openutils-mgnlcontrols/src/main/resources/mgnl-bootstrap-samples/controls/config.modules.controls.dialogs.samples-buttonSet.xml) =================================================================== --- magnoliamodules/branches/magnolia44/openutils-mgnlcontrols/src/main/resources/mgnl-bootstrap-samples/controls/config.modules.controls.dialogs.samples-buttonSet.xml (rev 0) +++ magnoliamodules/branches/magnolia44/openutils-mgnlcontrols/src/main/resources/mgnl-bootstrap-samples/controls/config.modules.controls.dialogs.samples-buttonSet.xml 2013-07-05 14:37:39 UTC (rev 4277) @@ -0,0 +1,222 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sv:node sv:name="samples-buttonSet" xmlns:sv="http://www.jcp.org/jcr/sv/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <sv:property sv:name="jcr:primaryType" sv:type="Name"> + <sv:value>mgnl:contentNode</sv:value> + </sv:property> + <sv:property sv:name="jcr:uuid" sv:type="String"> + <sv:value>8978824a-20fa-4a92-b6a6-626fa1c40484</sv:value> + </sv:property> + <sv:property sv:name="i18nBasename" sv:type="String"> + <sv:value>net.sourceforge.openutils.mgnltestwebapp.lang.messages</sv:value> + </sv:property> + <sv:property sv:name="jcr:createdBy" sv:type="String"> + <sv:value>admin</sv:value> + </sv:property> + <sv:node sv:name="MetaData"> + <sv:property sv:name="jcr:primaryType" sv:type="Name"> + <sv:value>mgnl:metaData</sv:value> + </sv:property> + <sv:property sv:name="jcr:createdBy" sv:type="String"> + <sv:value>admin</sv:value> + </sv:property> + <sv:property sv:name="mgnl:Data" sv:type="String"> + <sv:value>MetaData</sv:value> + </sv:property> + <sv:property sv:name="mgnl:activated" sv:type="Boolean"> + <sv:value>false</sv:value> + </sv:property> + <sv:property sv:name="mgnl:activatorid" sv:type="String"> + <sv:value>superuser</sv:value> + </sv:property> + <sv:property sv:name="mgnl:authorid" sv:type="String"> + <sv:value>superuser</sv:value> + </sv:property> + <sv:property sv:name="mgnl:creationdate" sv:type="String"> + <sv:value>2004-11-02T15:34:43.213+01:00</sv:value> + </sv:property> + <sv:property sv:name="mgnl:lastaction" sv:type="Date"> + <sv:value>2008-04-28T23:43:10.557+02:00</sv:value> + </sv:property> + <sv:property sv:name="mgnl:lastmodified" sv:type="Date"> + <sv:value>2013-07-05T15:43:15.853+02:00</sv:value> + </sv:property> + <sv:property sv:name="mgnl:title" sv:type="String"> + <sv:value/> + </sv:property> + </sv:node> + <sv:node sv:name="tabGeneral"> + <sv:property sv:name="jcr:primaryType" sv:type="Name"> + <sv:value>mgnl:contentNode</sv:value> + </sv:property> + <sv:property sv:name="jcr:uuid" sv:type="String"> + <sv:value>7361bf6e-9116-4a79-b0e1-7db49c958eaf</sv:value> + </sv:property> + <sv:property sv:name="controlType" sv:type="String"> + <sv:value>tab</sv:value> + </sv:property> + <sv:property sv:name="jcr:createdBy" sv:type="String"> + <sv:value>admin</sv:value> + </sv:property> + <sv:property sv:name="label" sv:type="String"> + <sv:value>Button set</sv:value> + </sv:property> + <sv:node sv:name="MetaData"> + <sv:property sv:name="jcr:primaryType" sv:type="Name"> + <sv:value>mgnl:metaData</sv:value> + </sv:property> + <sv:property sv:name="jcr:createdBy" sv:type="String"> + <sv:value>admin</sv:value> + </sv:property> + <sv:property sv:name="mgnl:Data" sv:type="String"> + <sv:value>MetaData</sv:value> + </sv:property> + <sv:property sv:name="mgnl:activated" sv:type="Boolean"> + <sv:value>false</sv:value> + </sv:property> + <sv:property sv:name="mgnl:activatorid" sv:type="String"> + <sv:value>superuser</sv:value> + </sv:property> + <sv:property sv:name="mgnl:authorid" sv:type="String"> + <sv:value>superuser</sv:value> + </sv:property> + <sv:property sv:name="mgnl:creationdate" sv:type="String"> + <sv:value>2004-11-02T15:34:29.217+01:00</sv:value> + </sv:property> + <sv:property sv:name="mgnl:lastaction" sv:type="Date"> + <sv:value>2008-06-19T14:49:08.436+02:00</sv:value> + </sv:property> + <sv:property sv:name="mgnl:lastmodified" sv:type="Date"> + <sv:value>2013-07-05T15:43:32.975+02:00</sv:value> + </sv:property> + </sv:node> + <sv:node sv:name="foo"> + <sv:property sv:name="jcr:primaryType" sv:type="Name"> + <sv:value>mgnl:contentNode</sv:value> + </sv:property> + <sv:property sv:name="jcr:mixinTypes" sv:type="Name" sv:multiple="true"> + <sv:value>mix:lockable</sv:value> + </sv:property> + <sv:property sv:name="jcr:uuid" sv:type="String"> + <sv:value>0f3c1fb7-02e1-48b3-bcc2-12b66506ba73</sv:value> + </sv:property> + <sv:property sv:name="controlType" sv:type="String"> + <sv:value>controls-radio</sv:value> + </sv:property> + <sv:property sv:name="jcr:createdBy" sv:type="String"> + <sv:value>admin</sv:value> + </sv:property> + <sv:property sv:name="label" sv:type="String"> + <sv:value>Foo</sv:value> + </sv:property> + <sv:property sv:name="optionsProvider" sv:type="String"> + <sv:value>net.sourceforge.openutils.mgnlcontrols.samples.SampleButtonSetOptionsProvider</sv:value> + </sv:property> + <sv:node sv:name="MetaData"> + <sv:property sv:name="jcr:primaryType" sv:type="Name"> + <sv:value>mgnl:metaData</sv:value> + </sv:property> + <sv:property sv:name="jcr:createdBy" sv:type="String"> + <sv:value>admin</sv:value> + </sv:property> + <sv:property sv:name="mgnl:activated" sv:type="Boolean"> + <sv:value>false</sv:value> + </sv:property> + <sv:property sv:name="mgnl:authorid" sv:type="String"> + <sv:value>superuser</sv:value> + </sv:property> + <sv:property sv:name="mgnl:creationdate" sv:type="Date"> + <sv:value>2013-06-14T15:54:03.927+02:00</sv:value> + </sv:property> + <sv:property sv:name="mgnl:lastmodified" sv:type="Date"> + <sv:value>2013-07-05T15:52:20.890+02:00</sv:value> + </sv:property> + </sv:node> + </sv:node> + <sv:node sv:name="bar"> + <sv:property sv:name="jcr:primaryType" sv:type="Name"> + <sv:value>mgnl:contentNode</sv:value> + </sv:property> + <sv:property sv:name="jcr:mixinTypes" sv:type="Name" sv:multiple="true"> + <sv:value>mix:lockable</sv:value> + </sv:property> + <sv:property sv:name="jcr:uuid" sv:type="String"> + <sv:value>a890c8a7-eb39-46f7-ab7e-b2d7645b95e9</sv:value> + </sv:property> + <sv:property sv:name="controlType" sv:type="String"> + <sv:value>controls-checkbox</sv:value> + </sv:property> + <sv:property sv:name="jcr:createdBy" sv:type="String"> + <sv:value>admin</sv:value> + </sv:property> + <sv:property sv:name="label" sv:type="String"> + <sv:value>Bar</sv:value> + </sv:property> + <sv:property sv:name="optionsProvider" sv:type="String"> + <sv:value>net.sourceforge.openutils.mgnlcontrols.samples.SampleButtonSetOptionsProvider</sv:value> + </sv:property> + <sv:node sv:name="MetaData"> + <sv:property sv:name="jcr:primaryType" sv:type="Name"> + <sv:value>mgnl:metaData</sv:value> + </sv:property> + <sv:property sv:name="jcr:createdBy" sv:type="String"> + <sv:value>admin</sv:value> + </sv:property> + <sv:property sv:name="mgnl:activated" sv:type="Boolean"> + <sv:value>false</sv:value> + </sv:property> + <sv:property sv:name="mgnl:authorid" sv:type="String"> + <sv:value>superuser</sv:value> + </sv:property> + <sv:property sv:name="mgnl:creationdate" sv:type="Date"> + <sv:value>2013-06-14T15:54:03.927+02:00</sv:value> + </sv:property> + <sv:property sv:name="mgnl:lastmodified" sv:type="Date"> + <sv:value>2013-07-05T15:56:11.917+02:00</sv:value> + </sv:property> + </sv:node> + </sv:node> + <sv:node sv:name="baz"> + <sv:property sv:name="jcr:primaryType" sv:type="Name"> + <sv:value>mgnl:contentNode</sv:value> + </sv:property> + <sv:property sv:name="jcr:mixinTypes" sv:type="Name" sv:multiple="true"> + <sv:value>mix:lockable</sv:value> + </sv:property> + <sv:property sv:name="jcr:uuid" sv:type="String"> + <sv:value>92c116a9-4f12-4dee-bd70-d4389115c1ba</sv:value> + </sv:property> + <sv:property sv:name="controlType" sv:type="String"> + <sv:value>controls-checkboxSwitch</sv:value> + </sv:property> + <sv:property sv:name="jcr:createdBy" sv:type="String"> + <sv:value>admin</sv:value> + </sv:property> + <sv:property sv:name="label" sv:type="String"> + <sv:value>Baz</sv:value> + </sv:property> + <sv:property sv:name="optionsProvider" sv:type="String"> + <sv:value>net.sourceforge.openutils.mgnlcontrols.samples.SampleButtonSetOptionsProvider</sv:value> + </sv:property> + <sv:node sv:name="MetaData"> + <sv:property sv:name="jcr:primaryType" sv:type="Name"> + <sv:value>mgnl:metaData</sv:value> + </sv:property> + <sv:property sv:name="jcr:createdBy" sv:type="String"> + <sv:value>admin</sv:value> + </sv:property> + <sv:property sv:name="mgnl:activated" sv:type="Boolean"> + <sv:value>false</sv:value> + </sv:property> + <sv:property sv:name="mgnl:authorid" sv:type="String"> + <sv:value>superuser</sv:value> + </sv:property> + <sv:property sv:name="mgnl:creationdate" sv:type="Date"> + <sv:value>2013-06-14T15:54:03.927+02:00</sv:value> + </sv:property> + <sv:property sv:name="mgnl:lastmodified" sv:type="Date"> + <sv:value>2013-07-05T15:52:57.016+02:00</sv:value> + </sv:property> + </sv:node> + </sv:node> + </sv:node> +</sv:node> Copied: magnoliamodules/branches/magnolia44/openutils-mgnlcontrols/src/main/resources/mgnl-bootstrap-samples/controls/config.modules.controls.templates.components.samples-buttonSet.xml (from rev 4276, magnoliamodules/trunk/openutils-mgnlcontrols/src/main/resources/mgnl-bootstrap-samples/controls/config.modules.controls.templates.components.samples-buttonSet.xml) =================================================================== --- magnoliamodules/branches/magnolia44/openutils-mgnlcontrols/src/main/resources/mgnl-bootstrap-samples/controls/config.modules.controls.templates.components.samples-buttonSet.xml (rev 0) +++ magnoliamodules/branches/magnolia44/openutils-mgnlcontrols/src/main/resources/mgnl-bootstrap-samples/controls/config.modules.controls.templates.components.samples-buttonSet.xml 2013-07-05 14:37:39 UTC (rev 4277) @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sv:node sv:name="samples-buttonSet" xmlns:sv="http://www.jcp.org/jcr/sv/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <sv:property sv:name="jcr:primaryType" sv:type="Name"> + <sv:value>mgnl:contentNode</sv:value> + </sv:property> + <sv:property sv:name="jcr:mixinTypes" sv:type="Name" sv:multiple="true"> + <sv:value>mix:lockable</sv:value> + </sv:property> + <sv:property sv:name="jcr:uuid" sv:type="String"> + <sv:value>543774c6-be98-4972-8ca9-7586e3734270</sv:value> + </sv:property> + <sv:property sv:name="description" sv:type="String"> + <sv:value>Sample button set paragraph</sv:value> + </sv:property> + <sv:property sv:name="dialog" sv:type="String"> + <sv:value>controls:samples-buttonSet</sv:value> + </sv:property> + <sv:property sv:name="jcr:createdBy" sv:type="String"> + <sv:value>admin</sv:value> + </sv:property> + <sv:property sv:name="renderType" sv:type="String"> + <sv:value>jsp</sv:value> + </sv:property> + <sv:property sv:name="templateScript" sv:type="String"> + <sv:value>/templates/samples-controls/paragraph-buttonSet.jsp</sv:value> + </sv:property> + <sv:property sv:name="title" sv:type="String"> + <sv:value>Button set sample</sv:value> + </sv:property> + <sv:node sv:name="MetaData"> + <sv:property sv:name="jcr:primaryType" sv:type="Name"> + <sv:value>mgnl:metaData</sv:value> + </sv:property> + <sv:property sv:name="jcr:createdBy" sv:type="String"> + <sv:value>admin</sv:value> + </sv:property> + <sv:property sv:name="mgnl:activated" sv:type="Boolean"> + <sv:value>false</sv:value> + </sv:property> + <sv:property sv:name="mgnl:authorid" sv:type="String"> + <sv:value>superuser</sv:value> + </sv:property> + <sv:property sv:name="mgnl:creationdate" sv:type="Date"> + <sv:value>2008-09-25T12:45:26.721+02:00</sv:value> + </sv:property> + <sv:property sv:name="mgnl:lastmodified" sv:type="Date"> + <sv:value>2013-07-05T15:58:37.273+02:00</sv:value> + </sv:property> + </sv:node> +</sv:node> Copied: magnoliamodules/branches/magnolia44/openutils-mgnlcontrols/src/main/resources/mgnl-files/templates/samples-controls/paragraph-buttonSet.jsp (from rev 4276, magnoliamodules/trunk/openutils-mgnlcontrols/src/main/resources/mgnl-files/templates/samples-controls/paragraph-buttonSet.jsp) =================================================================== --- magnoliamodules/branches/magnolia44/openutils-mgnlcontrols/src/main/resources/mgnl-files/templates/samples-controls/paragraph-buttonSet.jsp (rev 0) +++ magnoliamodules/branches/magnolia44/openutils-mgnlcontrols/src/main/resources/mgnl-files/templates/samples-controls/paragraph-buttonSet.jsp 2013-07-05 14:37:39 UTC (rev 4277) @@ -0,0 +1,9 @@ +<jsp:root version="2.0" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:c="http://java.sun.com/jsp/jstl/core" + xmlns:fmt="http://java.sun.com/jsp/jstl/fmt" xmlns:fn="http://java.sun.com/jsp/jstl/functions" xmlns:cms="http://magnolia-cms.com/taglib/templating-components/cms" + xmlns:cmsfn="http://magnolia-cms.com/taglib/templating-components/cmsfn" xmlns:media="http://net.sourceforge.openutils/mgnlMedia" + xmlns:mu="mgnlutils"> + <jsp:directive.page contentType="text/html; charset=UTF-8" session="false" /> + ${!empty(content.foo) ? content.foo : '-'}<br /> + ${!empty(content.bar) ? content.bar : '-'}<br /> + ${!empty(content.baz) ? content.baz : '-'}<br /> +</jsp:root> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |