if( view instanceof DataFormView && forItem )
{
final Item item = ((DataFormView) view).getItem(
actionDef.getFor()
);
final Action action = new Action(
actionName,
command,
code,
item,
actionDef.getDefault() != null &&
actionDef.getDefault().booleanValue()
);
view.addAction( action, active );
}
else
{
view.addAction( new Action(
actionName,
command,
code,
null,
actionDef.getDefault() != null &&