@Component(value="cuba_ExcelAction") @Scope(value="prototype") public class ExcelAction extends BaseAction implements Action.HasBeforeActionPerformedHandler
Action's behaviour can be customized by providing arguments to constructor or setting properties.
In order to provide your own implementation globally, create a subclass and register it in web-spring.xml
,
for example:
<bean id="cuba_ExcelAction" class="com.company.sample.gui.MyExcelAction" scope="prototype"/>Also, use
create()
static methods instead of constructors when creating the action programmatically.BaseAction.EnabledRule
Action.ActionPerformedEvent, Action.BeforeActionPerformedHandler, Action.HasBeforeActionPerformedHandler, Action.HasOpenType, Action.HasSecurityConstraint, Action.HasTarget, Action.Status, Action.UiPermissionAware
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ACTION_ID |
PROP_CAPTION, PROP_DESCRIPTION, PROP_ENABLED, PROP_ICON, PROP_SHORTCUT, PROP_VISIBLE
Constructor and Description |
---|
ExcelAction(ListComponent listComponent)
The simplest constructor.
|
ExcelAction(ListComponent listComponent,
ExportDisplay display)
Constructor that allows to specify the ExportDisplay implementation.
|
ExcelAction(ListComponent listComponent,
ExportDisplay display,
java.lang.String id)
Constructor that allows to specify all parameters.
|
ExcelAction(Table table)
The simplest constructor.
|
ExcelAction(Table table,
ExportDisplay display)
Constructor that allows to specify the ExportDisplay implementation.
|
ExcelAction(Table table,
ExportDisplay display,
java.lang.String id)
Constructor that allows to specify all parameters.
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerform(Component component)
This method is invoked by action owner component.
|
static ExcelAction |
create(ListComponent target)
Creates an action with default id.
|
static ExcelAction |
create(ListComponent target,
ExportDisplay display)
Creates an action with default id.
|
static ExcelAction |
create(ListComponent target,
ExportDisplay display,
java.lang.String id)
Creates an action with the given id.
|
Action.BeforeActionPerformedHandler |
getBeforeActionPerformedHandler() |
java.lang.String |
getFileName() |
boolean |
isExportAggregation() |
void |
setBeforeActionPerformedHandler(Action.BeforeActionPerformedHandler handler) |
void |
setExportAggregation(boolean exportAggregation) |
void |
setFileName(java.lang.String fileName) |
addEnabledRule, getTarget, isEnabledByUiPermissions, isVisibleByUiPermissions, refreshState, removeEnabledRule, setEnabled, setEnabledByUiPermissions, setTarget, setVisible, setVisibleByUiPermissions, withCaption, withDescription, withHandler, withIcon, withPrimary, withShortcut
addOwner, addPropertyChangeListener, getCaption, getDescription, getIcon, getId, getOwner, getOwners, getShortcutCombination, isEnabled, isPrimary, isVisible, removeOwner, removePropertyChangeListener, setCaption, setDescription, setIcon, setIconFromSet, setPrimary, setShortcut, setShortcutCombination
equals, 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 ExcelAction(Table table)
table
- table containing this actionpublic ExcelAction(Table table, ExportDisplay display)
table
- table containing this actiondisplay
- ExportDisplay implementationpublic ExcelAction(Table table, ExportDisplay display, java.lang.String id)
table
- table containing this actiondisplay
- ExportDisplay implementation
ExcelExporter
id
- action's namepublic ExcelAction(ListComponent listComponent)
listComponent
- listComponent containing this actionpublic ExcelAction(ListComponent listComponent, ExportDisplay display)
listComponent
- listComponent containing this actiondisplay
- ExportDisplay implementationpublic ExcelAction(ListComponent listComponent, ExportDisplay display, java.lang.String id)
listComponent
- listComponent containing this actiondisplay
- ExportDisplay implementation
ExcelExporter
id
- action's namepublic static ExcelAction create(ListComponent target)
target
- component containing this actionpublic static ExcelAction create(ListComponent target, ExportDisplay display)
target
- component containing this actiondisplay
- ExportDisplay implementationpublic static ExcelAction create(ListComponent target, ExportDisplay display, java.lang.String id)
target
- component containing this actiondisplay
- ExportDisplay implementationid
- action's namepublic java.lang.String getFileName()
public void setFileName(java.lang.String fileName)
fileName
- excel file name without extensionpublic void actionPerform(Component component)
actionPerform
in interface Action
actionPerform
in class BaseAction
component
- component invoking actionpublic Action.BeforeActionPerformedHandler getBeforeActionPerformedHandler()
getBeforeActionPerformedHandler
in interface Action.HasBeforeActionPerformedHandler
public void setBeforeActionPerformedHandler(Action.BeforeActionPerformedHandler handler)
setBeforeActionPerformedHandler
in interface Action.HasBeforeActionPerformedHandler
public boolean isExportAggregation()
public void setExportAggregation(boolean exportAggregation)