org.springframework.richclient.application.support
Class LookupViewDescriptor
java.lang.Object
org.springframework.richclient.application.support.ApplicationServicesAccessor
org.springframework.richclient.core.LabeledObjectSupport
org.springframework.richclient.application.support.LookupViewDescriptor
- All Implemented Interfaces:
- BeanFactoryAware, BeanNameAware, InitializingBean, PropertyChangePublisher, PageComponentDescriptor, ViewDescriptor, CommandLabelConfigurable, DescribedElement, DescriptionConfigurable, TitleConfigurable, VisualizedElement, ImageConfigurable
public class LookupViewDescriptor
- extends LabeledObjectSupport
- implements ViewDescriptor, BeanNameAware, BeanFactoryAware, InitializingBean
An implementation of ViewDescriptor
that instantiates new Views
by looking them up in a Spring BeanFactory
. You must set the bean
name to lookup in the BeanFactory
via
setViewPrototypeBeanName(String)
, and the referenced bean
must be a declared non-singleton in the BeanFactory
(a prototype bean).
- Author:
- Andy DePue
Methods inherited from class org.springframework.richclient.core.LabeledObjectSupport |
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, getAccelerator, getCaption, getDescription, getDisplayName, getIcon, getImage, getLabel, getMnemonic, getMnemonicIndex, hasChanged, hasChanged, hasChanged, removePropertyChangeListener, removePropertyChangeListener, setCaption, setDescription, setImage, setLabelInfo, setTitle, toString |
Methods inherited from class org.springframework.richclient.application.support.ApplicationServicesAccessor |
getActiveWindow, getApplication, getApplicationContext, getApplicationName, getApplicationServices, getCommandConfigurer, getComponentFactory, getConversionService, getIconSource, getImageSource, getMessage, getMessage, getMessage, getMessage, getMessages, getMessageSource, getObjectConfigurer, getService |
LookupViewDescriptor
public LookupViewDescriptor()
setId
public void setId(String id)
getViewPrototypeBeanName
public String getViewPrototypeBeanName()
setViewPrototypeBeanName
public void setViewPrototypeBeanName(String viewPrototypeBeanName)
getBeanFactory
public BeanFactory getBeanFactory()
createView
protected View createView()
getId
public String getId()
- Description copied from interface:
PageComponentDescriptor
- Returns the identifier of this descriptor.
- Specified by:
getId
in interface PageComponentDescriptor
- Returns:
- The descriptor id.
createShowViewCommand
public ActionCommand createShowViewCommand(ApplicationWindow window)
- Description copied from interface:
ViewDescriptor
- Create a command that when executed, will attempt to show the
page component described by this descriptor in the provided
application window.
- Specified by:
createShowViewCommand
in interface ViewDescriptor
- Parameters:
window
- The window
- Returns:
- The show page component command.
getShowViewCommandLabel
public CommandButtonLabelInfo getShowViewCommandLabel()
- Specified by:
getShowViewCommandLabel
in interface ViewDescriptor
createPageComponent
public PageComponent createPageComponent()
- Description copied from interface:
PageComponentDescriptor
- Creates the page component defined by this descriptor.
- Specified by:
createPageComponent
in interface PageComponentDescriptor
- Returns:
- The page component, never null.
setBeanName
public void setBeanName(String name)
- Specified by:
setBeanName
in interface BeanNameAware
setBeanFactory
public void setBeanFactory(BeanFactory beanFactory)
throws BeansException
- Specified by:
setBeanFactory
in interface BeanFactoryAware
- Throws:
BeansException
afterPropertiesSet
public final void afterPropertiesSet()
throws Exception
- Specified by:
afterPropertiesSet
in interface InitializingBean
- Throws:
Exception
initViewDescriptor
protected void initViewDescriptor()
throws Exception
- Subclasses may override this method to perform intialization after
properties have been set.
- Throws:
Exception
Copyright © 2004-2008 The Spring Framework. All Rights Reserved.