org.ujorm.wicket.component.grid
Class CommonAction<U extends Ujo>

java.lang.Object
  extended by org.ujorm.wicket.component.grid.CommonAction<U>
All Implemented Interfaces:
Serializable, CommonActions

public class CommonAction<U extends Ujo>
extends Object
implements Serializable, CommonActions

The common action panel

Author:
Pavel Ponec
See Also:
Serialized Form

Field Summary
static String DEFAULT_PREFIX
          Default Action label prefix is "action.label."
 
Fields inherited from interface org.ujorm.wicket.CommonActions
CLONE, CREATE, DELETE, ERROR, EXIT, FILTER, LOGIN, LOGIN_CHANGED, READ, SELECT, UNDEFINED, UPDATE
 
Constructor Summary
CommonAction(String actionId)
          Create Resource model label using actionId with a prefix "label.action."
CommonAction(String actionId, org.apache.wicket.model.IModel<String> label)
          Constructor with full arguments
 
Method Summary
 String getActionId()
          Action id
 org.apache.wicket.model.IModel<String> getLabel()
          Label of the action
 boolean isVisible(U row)
          Is the action visible? The method is ready to to overriding.
static CommonAction[] of(String... actions)
          A common action factory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_PREFIX

public static final String DEFAULT_PREFIX
Default Action label prefix is "action.label."

See Also:
Constant Field Values
Constructor Detail

CommonAction

public CommonAction(String actionId)
Create Resource model label using actionId with a prefix "label.action."

Parameters:
actionId - Action identifier, see common constants from the class CommonActions.
See Also:
CommonActions

CommonAction

public CommonAction(@Nonnull
                    String actionId,
                    @Nullable
                    org.apache.wicket.model.IModel<String> label)
Constructor with full arguments

Parameters:
actionId - Action identifier, see common constants from the class CommonActions.
label - Optional Label, the null value is replaced by the key: "label.action." + actionId.
visibleModel - Visible model is optional
See Also:
CommonActions
Method Detail

getActionId

public String getActionId()
Action id


getLabel

public org.apache.wicket.model.IModel<String> getLabel()
Label of the action


isVisible

public boolean isVisible(U row)
Is the action visible? The method is ready to to overriding.


of

public static CommonAction[] of(String... actions)
A common action factory

Parameters:
actions - An array of the action names
Returns:
CommonActions
See Also:
class


Copyright © 2015. All Rights Reserved.