001/*
002 * (C) Copyright 2006-2007 Nuxeo SAS (http://nuxeo.com/) and contributors.
003 *
004 * All rights reserved. This program and the accompanying materials
005 * are made available under the terms of the GNU Lesser General Public License
006 * (LGPL) version 2.1 which accompanies this distribution, and is available at
007 * http://www.gnu.org/licenses/lgpl.html
008 *
009 * This library is distributed in the hope that it will be useful,
010 * but WITHOUT ANY WARRANTY; without even the implied warranty of
011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
012 * Lesser General Public License for more details.
013 *
014 * Contributors:
015 *     <a href="mailto:at@nuxeo.com">Anahide Tchertchian</a>
016 *
017 * $Id: RenderVariables.java 26053 2007-10-16 01:45:43Z atchertchian $
018 */
019
020package org.nuxeo.ecm.platform.forms.layout.facelets;
021
022/**
023 * List of render variables.
024 * <p>
025 * Variables which names will be available in a layout/widget rendering context.
026 * <p>
027 * This allows to use them in properties definitions.
028 *
029 * @author <a href="mailto:at@nuxeo.com">Anahide Tchertchian</a>
030 */
031public class RenderVariables {
032
033    public enum globalVariables {
034        value,
035        // deprecate document: not exposed anymore
036        @Deprecated
037        document,
038        //
039        layoutValue, mode, layoutMode
040    }
041
042    public enum layoutVariables {
043        layout, layoutProperty
044    }
045
046    public enum rowVariables {
047        layoutRow, layoutRowIndex
048    }
049
050    public enum columnVariables {
051        layoutColumn, layoutColumnIndex,
052    }
053
054    public enum widgetVariables {
055        //
056        widget,
057        //
058        widgetIndex,
059        //
060        field,
061        //
062        widgetProperty,
063        // @since 5.8
064        widgetProperties,
065        // @since 5.7
066        widgetControl,
067        //
068        fieldOrValue,
069    }
070
071    /**
072     * @since 6.0
073     */
074    public enum widgetTemplatingZones {
075        // @since 6.0, templating zone for inputs, useful for ajax
076        // interactions propagated from template (typically a f:ajax element)
077        inside_input_widget,
078    }
079
080}