org.jspresso.framework.view.descriptor.basic
Class EntityCardViewDescriptor
java.lang.Object
org.jspresso.framework.util.descriptor.DefaultDescriptor
org.jspresso.framework.util.descriptor.DefaultIconDescriptor
org.jspresso.framework.view.descriptor.basic.BasicViewDescriptor
org.jspresso.framework.view.descriptor.basic.AbstractCardViewDescriptor
org.jspresso.framework.view.descriptor.basic.EntityCardViewDescriptor
- All Implemented Interfaces:
- Cloneable, ISecurable, IPermIdSource, IDescriptor, IIconDescriptor, IGateAccessible, ICloneable, IActionable, ICardNameSelector, ICardViewDescriptor, IViewDescriptor
public class EntityCardViewDescriptor
- extends AbstractCardViewDescriptor
This card view provides a simple card determination strategy that is based on
the bound model type. This strategy pulls up the card whose model descriptor
matches the type of the bound model.
- Version:
- $LastChangedRevision: 5621 $
- Author:
- Vincent Vandenschrick
| Methods inherited from class org.jspresso.framework.view.descriptor.basic.BasicViewDescriptor |
getActionMap, getBackground, getBorderType, getFont, getForeground, getGrantedRoles, getI18nDescription, getI18nName, getIconImageURL, getModelDescriptor, getPermId, getPreferredHeight, getPreferredSize, getPreferredWidth, getReadabilityGates, getSecondaryActionMap, getWritabilityGates, isReadOnly, setActionMap, setBackground, setBorderType, setFont, setForeground, setGrantedRoles, setModelDescriptor, setPermId, setPreferredHeight, setPreferredWidth, setReadabilityGates, setReadOnly, setSecondaryActionMap, setWritabilityGates |
EntityCardViewDescriptor
public EntityCardViewDescriptor()
getCardNameForModel
public String getCardNameForModel(Object model,
Subject subject)
- Uses the component contract name as card name.
Gets the card name to use to present the model.
- Parameters:
model - the model to back the view.subject - the JAAS subject.
- Returns:
- the card name to look up the view.
setViewDescriptors
public void setViewDescriptors(List<IViewDescriptor> viewDescriptors)
- Registers the list of card view descriptors. Every time the bound model
changes, this list is iterated until a card with a matching model is found.
The first matching card is displayed. Whenever no registered card matches,
an empty view is displayed.
- Parameters:
viewDescriptors - the viewDescriptors to set.
Copyright © 2005-2012 Jspresso. All Rights Reserved.