@Component(value="cuba_RelatedAction") @Scope(value="prototype") public class RelatedAction extends ListAction implements Action.HasBeforeActionPerformedHandler
RelatedEntities
visual component.
In order to provide your own implementation globally, create a subclass and register it in web-spring.xml
,
for example:
<bean id="cuba_RelatedAction" class="com.company.sample.gui.MyRelatedAction" scope="prototype"/>
BaseAction.EnabledRule
Action.ActionPerformedEvent, Action.BeforeActionPerformedHandler, Action.HasBeforeActionPerformedHandler, Action.HasOpenType, Action.HasSecurityConstraint, Action.HasTarget, Action.SecuredAction, Action.Status
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ACTION_ID |
protected Action.BeforeActionPerformedHandler |
beforeActionPerformedHandler |
protected java.lang.String |
filterCaption |
protected MetaClass |
metaClass |
protected MetaProperty |
metaProperty |
protected WindowManager.OpenType |
openType |
protected RelatedEntitiesAPI |
relatedEntitiesApi |
protected java.lang.String |
screen |
target
caption, description, enabled, eventHub, icon, id, owners, primary, shortcut, visible
PROP_CAPTION, PROP_DESCRIPTION, PROP_ENABLED, PROP_ICON, PROP_SHORTCUT, PROP_VISIBLE
Constructor and Description |
---|
RelatedAction(java.lang.String id,
ListComponent target,
MetaClass metaClass,
MetaProperty metaProperty) |
Modifier and Type | Method and Description |
---|---|
void |
actionPerform(Component component)
Invoked by owning component when an action occurs.
|
static RelatedAction |
create(java.lang.String id,
ListComponent target,
MetaClass metaClass,
MetaProperty metaProperty)
Creates an action with the given id.
|
Action.BeforeActionPerformedHandler |
getBeforeActionPerformedHandler() |
void |
setBeforeActionPerformedHandler(Action.BeforeActionPerformedHandler handler) |
void |
setFilterCaption(java.lang.String filterCaption) |
protected void |
setMessageTools(MessageTools messageTools) |
void |
setOpenType(WindowManager.OpenType openType) |
void |
setScreen(java.lang.String screen) |
getTarget, setTarget, withCaption, withDescription, withHandler, withIcon, withPrimary, withShortcut
addActionPerformedListener, addEnabledRule, isApplicable, isEnabledByRule, isEnabledByUiPermissions, isPermitted, isVisibleByUiPermissions, refreshState, removeEnabledRule, setEnabled, setEnabledByUiPermissions, setEnabledInternal, setVisible, setVisibleByUiPermissions, setVisibleInternal
addOwner, addPropertyChangeListener, firePropertyChange, getCaption, getDefaultCaption, getDescription, getEventHub, getIcon, getId, getOwner, getOwners, getShortcutCombination, hasSubscriptions, isEnabled, isPrimary, isVisible, removeOwner, removePropertyChangeListener, setCaption, setDescription, setIcon, setIconFromSet, setPrimary, setShortcut, setShortcutCombination
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addOwner, addPropertyChangeListener, getCaption, getDescription, getIcon, getId, getOwner, getOwners, getShortcutCombination, isEnabled, isVisible, refreshState, removeOwner, removePropertyChangeListener, setCaption, setDescription, setEnabled, setIcon, setIconFromSet, setShortcut, setShortcutCombination, setVisible
public static final java.lang.String ACTION_ID
protected final MetaProperty metaProperty
protected final MetaClass metaClass
protected java.lang.String screen
protected java.lang.String filterCaption
protected WindowManager.OpenType openType
@Inject protected RelatedEntitiesAPI relatedEntitiesApi
protected Action.BeforeActionPerformedHandler beforeActionPerformedHandler
public RelatedAction(java.lang.String id, ListComponent target, MetaClass metaClass, MetaProperty metaProperty)
public static RelatedAction create(java.lang.String id, ListComponent target, MetaClass metaClass, MetaProperty metaProperty)
target
- component containing this action@Inject protected void setMessageTools(MessageTools messageTools)
public void setScreen(java.lang.String screen)
public void setFilterCaption(java.lang.String filterCaption)
public void setOpenType(WindowManager.OpenType openType)
public void actionPerform(Component component)
Action
actionPerform
in interface Action
actionPerform
in class BaseAction
component
- invoking componentpublic Action.BeforeActionPerformedHandler getBeforeActionPerformedHandler()
getBeforeActionPerformedHandler
in interface Action.HasBeforeActionPerformedHandler
public void setBeforeActionPerformedHandler(Action.BeforeActionPerformedHandler handler)
setBeforeActionPerformedHandler
in interface Action.HasBeforeActionPerformedHandler