org.kuali.rice.krad.uif.component
Interface Configurable

All Known Subinterfaces:
CollectionLayoutManager, Component, ComponentModifier, Container, ContentElement, Control, Field, LayoutManager, Widget
All Known Implementing Classes:
Action, ActionField, ActionSecurity, AjaxAction, BindingInfo, BlockUI, BoxLayoutManager, BreadCrumbs, CheckboxControl, CheckboxGroupControl, CollectionGroup, CollectionGroupSecurity, ComparableInfo, CompareFieldCreateModifier, ComponentBase, ComponentConvertModifier, ComponentModifierBase, ComponentSecurity, ConfigurableBase, ContainerBase, ContentElementBase, ControlBase, DataField, DataFieldSecurity, DataTable, DatePicker, DialogGroup, Disclosure, DocumentView, FieldBase, FieldGroup, FieldSecurity, FieldValidationMessages, FileControl, FormView, GenericField, GridLayoutManager, Group, GroupControl, GroupValidationMessages, Growls, Header, Help, HiddenControl, HistoryEntry, Iframe, Image, ImageField, InputField, Inquiry, InquiryView, Label, LabelSeparateModifier, LayoutManagerBase, LightBox, Link, LinkField, LinkGroup, LookupInputField, LookupView, MaintenanceView, Message, MessageField, MultiValueControlBase, NavigationGroup, NodePrototype, PageGroup, PageValidationMessages, PropertyReplacer, QuickFinder, RadioGroupControl, RemoteFieldsHolder, Reorderer, ReorderingGroup, RichTable, Scrollpane, SelectControl, Space, SpaceField, Spinner, SpinnerControl, StackedLayoutManager, Suggest, TabGroup, TableLayoutManager, Tabs, TextAreaControl, TextControl, Tooltip, Tree, TreeGroup, UserControl, ValidationMessages, View, ViewTheme, WidgetBase

public interface Configurable

Marks any class that can be configured through the UIF dictionary

Indicates behavior that must be supported by an Class that can be configured through the UIF dictionary, such as property expressions.

Author:
Kuali Rice Team (rice.collab@kuali.org)

Method Summary
 Map<String,String> getExpressionGraph()
          Map of expressions that were configured for the object's graph
 String getPropertyExpression(String propertyName)
          Returns the expression configured for the property with the given name
 Map<String,String> getPropertyExpressions()
          Map of expressions that should be evaluated to conditionally set a property on the component
 Map<String,String> getRefreshExpressionGraph()
          Map of expressions that should apply when the component is refresh
 void setExpressionGraph(Map<String,String> expressionGraph)
          Setter for the map of expressions contained on the configurable graph
 void setPropertyExpressions(Map<String,String> propertyExpressions)
          Setter for the Map of property expressions
 void setRefreshExpressionGraph(Map<String,String> refreshExpressionGraph)
          Setter for the component's refresh expression graph
 

Method Detail

getExpressionGraph

Map<String,String> getExpressionGraph()
Map of expressions that were configured for the object's graph

During processing of the UIF configuration, expressions are pulled out and placed into this map for the component graph. A component graph contains the component and all one to one nested components (but not those that are contained in collections, each of these begins another graph). The expressions are placed at the root component level instead of the actual nested component for handling of nested property configuration and overridding

The expression graph map key gives the property name (possibly nested) the expression was configured on, and the map value gives the expression. During the view lifecycle, see ViewHelperServiceImpl.performComponentApplyModel(org.kuali.rice.krad.uif.view.View, org.kuali.rice.krad.uif.component.Component, java.lang.Object), the expressions are moved to the getPropertyExpressions() map for the configurable they should be evaluated on

Returns:
Map map of expressions contained on the configurable graph

setExpressionGraph

void setExpressionGraph(Map<String,String> expressionGraph)
Setter for the map of expressions contained on the configurable graph

Parameters:
expressionGraph -

getRefreshExpressionGraph

Map<String,String> getRefreshExpressionGraph()
Map of expressions that should apply when the component is refresh

Expressions may exist on a parent component that impact the component state when it is being refreshed. These expressions are pulled out and placed into this map for evaluation during the refresh process

Returns:
Map key is property name to set and value is the expression to evaluate

setRefreshExpressionGraph

void setRefreshExpressionGraph(Map<String,String> refreshExpressionGraph)
Setter for the component's refresh expression graph

Parameters:
refreshExpressionGraph -

getPropertyExpressions

Map<String,String> getPropertyExpressions()
Map of expressions that should be evaluated to conditionally set a property on the component

When configuring a component property through XML an expression can be given using the @{} placeholder. During the loading of the XML any such expressions are captured and placed into this Map, with the property they apply to set as the Map key. The expressions are then evaluated during the apply model phase and the result is set as the property value.

Note after the expression is picked up, the property configuration is removed. Thus the property in the component will only have its default object value until the expression is evaluated

Returns:
Map map of expressions where key is property name and value is expression to evaluate

setPropertyExpressions

void setPropertyExpressions(Map<String,String> propertyExpressions)
Setter for the Map of property expressions

Parameters:
propertyExpressions -

getPropertyExpression

String getPropertyExpression(String propertyName)
Returns the expression configured for the property with the given name

Returns:
String expression for property or null if expression is not configured
See Also:
getPropertyExpressions()


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.