@Component(value="cuba_RelatedAction") @Scope(value="prototype") public class RelatedAction extends io.jmix.ui.action.ListAction implements 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"/>
io.jmix.ui.action.BaseAction.EnabledRule
HasBeforeActionPerformedHandler.BeforeActionPerformedHandler
io.jmix.ui.action.Action.ActionPerformedEvent, io.jmix.ui.action.Action.AdjustWhenScreenReadOnly, io.jmix.ui.action.Action.ExecutableAction, io.jmix.ui.action.Action.HasPrimaryState, io.jmix.ui.action.Action.HasSecurityConstraint, io.jmix.ui.action.Action.HasTarget, io.jmix.ui.action.Action.MainTabSheetAction, io.jmix.ui.action.Action.ScreenOpeningAction, io.jmix.ui.action.Action.SecuredAction, io.jmix.ui.action.Action.Status
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ACTION_ID |
protected HasBeforeActionPerformedHandler.BeforeActionPerformedHandler |
beforeActionPerformedHandler |
protected java.lang.String |
filterCaption |
protected io.jmix.core.metamodel.model.MetaClass |
metaClass |
protected io.jmix.core.metamodel.model.MetaProperty |
metaProperty |
protected WindowManager.OpenType |
openType |
protected RelatedEntitiesAPI |
relatedEntitiesApi |
protected java.lang.String |
screen |
Constructor and Description |
---|
RelatedAction(java.lang.String id,
io.jmix.ui.component.ListComponent target,
io.jmix.core.metamodel.model.MetaClass metaClass,
io.jmix.core.metamodel.model.MetaProperty metaProperty) |
Modifier and Type | Method and Description |
---|---|
void |
actionPerform(io.jmix.ui.component.Component component) |
static RelatedAction |
create(java.lang.String id,
io.jmix.ui.component.ListComponent target,
io.jmix.core.metamodel.model.MetaClass metaClass,
io.jmix.core.metamodel.model.MetaProperty metaProperty)
Creates an action with the given id.
|
HasBeforeActionPerformedHandler.BeforeActionPerformedHandler |
getBeforeActionPerformedHandler() |
void |
setBeforeActionPerformedHandler(HasBeforeActionPerformedHandler.BeforeActionPerformedHandler handler)
Sets handler that is invoked before the action is executed.
|
void |
setFilterCaption(java.lang.String filterCaption) |
protected void |
setMessageTools(io.jmix.core.MessageTools messageTools) |
void |
setOpenType(WindowManager.OpenType openType) |
void |
setRelatedEntitiesApi(RelatedEntitiesAPI relatedEntitiesApi) |
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, getDescription, getEventHub, getIcon, getId, getOwner, getOwners, getShortcutCombination, hasSubscriptions, isEnabled, isPrimary, isVisible, removeOwner, removePropertyChangeListener, setCaption, setDescription, setIcon, 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, setShortcut, setShortcutCombination, setVisible
public static final java.lang.String ACTION_ID
protected final io.jmix.core.metamodel.model.MetaProperty metaProperty
protected final io.jmix.core.metamodel.model.MetaClass metaClass
protected java.lang.String screen
protected java.lang.String filterCaption
protected WindowManager.OpenType openType
protected RelatedEntitiesAPI relatedEntitiesApi
protected HasBeforeActionPerformedHandler.BeforeActionPerformedHandler beforeActionPerformedHandler
public RelatedAction(java.lang.String id, io.jmix.ui.component.ListComponent target, io.jmix.core.metamodel.model.MetaClass metaClass, io.jmix.core.metamodel.model.MetaProperty metaProperty)
public static RelatedAction create(java.lang.String id, io.jmix.ui.component.ListComponent target, io.jmix.core.metamodel.model.MetaClass metaClass, io.jmix.core.metamodel.model.MetaProperty metaProperty)
target
- component containing this action@Autowired protected void setMessageTools(io.jmix.core.MessageTools messageTools)
@Autowired public void setRelatedEntitiesApi(RelatedEntitiesAPI relatedEntitiesApi)
public void setScreen(java.lang.String screen)
public void setFilterCaption(java.lang.String filterCaption)
public void setOpenType(WindowManager.OpenType openType)
public void actionPerform(io.jmix.ui.component.Component component)
actionPerform
in interface io.jmix.ui.action.Action
actionPerform
in class io.jmix.ui.action.BaseAction
public HasBeforeActionPerformedHandler.BeforeActionPerformedHandler getBeforeActionPerformedHandler()
getBeforeActionPerformedHandler
in interface HasBeforeActionPerformedHandler
public void setBeforeActionPerformedHandler(HasBeforeActionPerformedHandler.BeforeActionPerformedHandler handler)
HasBeforeActionPerformedHandler
setBeforeActionPerformedHandler
in interface HasBeforeActionPerformedHandler
handler
- handler to set