Nuxeo Enterprise Platform 5.4

org.nuxeo.ecm.platform.forms.layout.service
Interface WebLayoutManager

All Superinterfaces:
LayoutManager, java.io.Serializable
All Known Implementing Classes:
WebLayoutManagerImpl

public interface WebLayoutManager
extends LayoutManager

Web Layout manager interface.

It manages registries of layout definitions and widget types and handles the creation of layouts and widgets instances.

Author:
Anahide Tchertchian

Method Summary
 Widget createWidget(com.sun.facelets.FaceletContext ctx, java.lang.String type, java.lang.String mode, java.lang.String valueName, java.util.List<FieldDefinition> fieldDefinitions, java.lang.String label, java.lang.String helpLabel, java.lang.Boolean translated, java.util.Map<java.lang.String,java.io.Serializable> properties, Widget[] subWidgets)
          Returns a widget computed from given information.
 Widget createWidget(com.sun.facelets.FaceletContext ctx, java.lang.String type, java.lang.String mode, java.lang.String valueName, java.util.Map<java.lang.String,java.io.Serializable> properties, Widget[] subWidgets)
          Returns a widget computed from given information.
 com.sun.facelets.FaceletHandler getFaceletHandler(com.sun.facelets.FaceletContext ctx, com.sun.facelets.tag.TagConfig config, Widget widget)
          Returns the facelet handler for given widget.
 Layout getLayout(com.sun.facelets.FaceletContext ctx, LayoutDefinition layoutDef, java.lang.String mode, java.lang.String valueName, java.util.List<java.lang.String> selectedRows, boolean selectAllRowsByDefault)
          Returns the computed layout for this definition, mode and list of selected rows in given context, or null if the layout definition is null.
 Layout getLayout(com.sun.facelets.FaceletContext ctx, java.lang.String layoutName, java.lang.String mode, java.lang.String valueName)
          Returns the computed layout for this name and mode in given context, or null if no layout with this name is found.
 Layout getLayout(com.sun.facelets.FaceletContext ctx, java.lang.String layoutName, java.lang.String mode, java.lang.String valueName, java.util.List<java.lang.String> selectedRows, boolean selectAllRowsByDefault)
          Returns the computed layout for this name, mode and list of selected rows in given context, or null if no layout with this name is found.
 WidgetTypeHandler getWidgetTypeHandler(java.lang.String typeName)
          Returns the widget type handler for the registered widget type with this type name.
 
Methods inherited from interface org.nuxeo.ecm.platform.forms.layout.api.service.LayoutManager
getLayoutDefinition, getWidgetDefinition, getWidgetType, getWidgetTypeDefinition, getWidgetTypeDefinitions
 

Method Detail

getWidgetTypeHandler

WidgetTypeHandler getWidgetTypeHandler(java.lang.String typeName)
                                       throws WidgetException
Returns the widget type handler for the registered widget type with this type name.

If the no widget type is found with this name, return null.

Throws:
WidgetException

getLayout

Layout getLayout(com.sun.facelets.FaceletContext ctx,
                 java.lang.String layoutName,
                 java.lang.String mode,
                 java.lang.String valueName)
Returns the computed layout for this name and mode in given context, or null if no layout with this name is found.

When a widget is configured not to be rendered in this mode, the layout will hold a null value instead. As well, when a row does not hold any non-null widget in this mode, the layout will not hold it.

Parameters:
ctx - the facelet context this layout will be computed in. If context is null, no expressions can be resolved during computing.
layoutName - the layout definition name.
mode - the mode.
valueName - the value name to use when computing tag attributes.
Returns:
a layout computed in this context.
See Also:
getLayout(FaceletContext, String, String, String, List, boolean)

getLayout

Layout getLayout(com.sun.facelets.FaceletContext ctx,
                 java.lang.String layoutName,
                 java.lang.String mode,
                 java.lang.String valueName,
                 java.util.List<java.lang.String> selectedRows,
                 boolean selectAllRowsByDefault)
Returns the computed layout for this name, mode and list of selected rows in given context, or null if no layout with this name is found.

Parameters:
layoutName - the layout definition name.
Returns:
a layout computed in this context.
Since:
5.4
See Also:
LayoutManager.getLayoutDefinition(String), getLayout(FaceletContext, LayoutDefinition, String, String, List, boolean)

getLayout

Layout getLayout(com.sun.facelets.FaceletContext ctx,
                 LayoutDefinition layoutDef,
                 java.lang.String mode,
                 java.lang.String valueName,
                 java.util.List<java.lang.String> selectedRows,
                 boolean selectAllRowsByDefault)
Returns the computed layout for this definition, mode and list of selected rows in given context, or null if the layout definition is null.

When a widget is configured not to be rendered in this mode, the layout will hold a null value instead. As well, when a row does not hold any non-null widget in this mode, the layout will not hold it.

If parameter selectedRows is not null, layout rows will be filtered according to this value. If selectedRows is null and parameter selectAllRowsByDefault is true, all rows will be taken into account, even rows marked as not selected by default.

Parameters:
ctx - the facelet context this layout will be computed in. If context is null, no expressions can be resolved during computing.
layoutDef - the layout definition instance.
mode - the mode.
valueName - the value name to use when computing tag attributes.
selectedRows - the list of selected rows names
selectAllRowsByDefault - boolean indicating if all rows should be considered selected by default in case parameter selectedRows resolves to null.
Returns:
a layout computed in this context.
Since:
5.4

getFaceletHandler

com.sun.facelets.FaceletHandler getFaceletHandler(com.sun.facelets.FaceletContext ctx,
                                                  com.sun.facelets.tag.TagConfig config,
                                                  Widget widget)
Returns the facelet handler for given widget.

Parameters:
ctx - the facelet context.
config - the tag config, used to hook the handler in the jsf tree.
widget - the computed widget.
Returns:
a facelet handler.

createWidget

Widget createWidget(com.sun.facelets.FaceletContext ctx,
                    java.lang.String type,
                    java.lang.String mode,
                    java.lang.String valueName,
                    java.util.Map<java.lang.String,java.io.Serializable> properties,
                    Widget[] subWidgets)
Returns a widget computed from given information.

Parameters:
ctx - the facelet context this layout will be computed in. If context is null, no expressions can be resolved during computing.
type - the widget type name.
mode - the mode.
valueName - the value name to use when computing tag attributes.
properties - optional properties to use when computing the widget.
subWidgets - optional sub widgets for this widget.
Returns:
a widget computed in this context.
See Also:
createWidget(FaceletContext, String, String, String, List, String, String, Boolean, Map, Widget[])

createWidget

Widget createWidget(com.sun.facelets.FaceletContext ctx,
                    java.lang.String type,
                    java.lang.String mode,
                    java.lang.String valueName,
                    java.util.List<FieldDefinition> fieldDefinitions,
                    java.lang.String label,
                    java.lang.String helpLabel,
                    java.lang.Boolean translated,
                    java.util.Map<java.lang.String,java.io.Serializable> properties,
                    Widget[] subWidgets)
Returns a widget computed from given information.

Parameters:
ctx - the facelet context this layout will be computed in. If context is null, no expressions can be resolved during computing.
type - the widget type name.
mode - the mode.
valueName - the value name to use when computing tag attributes.
fieldDefinitions -
label - the widget label
helpLabel - the widget help label
translated - if true, the labels will be translated
properties - optional properties to use when computing the widget.
subWidgets - optional sub widgets for this widget.
Returns:
a widget computed in this context.
Since:
5.4

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.