use of org.applause.lang.applauseDsl.UIActionNavigateAction in project applause by applause.
the class DefaultListScreenActionCompiler method compileActionButton.
private CharSequence compileActionButton(final UIAction it) {
CharSequence _xifexpression = null;
UIActionSpecification _action = it.getAction();
if ((_action instanceof UIActionNavigateAction)) {
CharSequence _switchResult = null;
UIActionSpecification _action_1 = it.getAction();
ActionVerb _actionVerb = ((UIActionNavigateAction) _action_1).getActionVerb();
final ActionVerb _switchValue = _actionVerb;
boolean _matched = false;
if (!_matched) {
if (Objects.equal(_switchValue, ActionVerb.ADD)) {
_matched = true;
Screen _screen = this._defaultListScreenClassExtensions.screen(it);
CharSequence _compileActionButton_AddItem = this.compileActionButton_AddItem(_screen);
_switchResult = _compileActionButton_AddItem;
}
}
_xifexpression = _switchResult;
}
return _xifexpression;
}
use of org.applause.lang.applauseDsl.UIActionNavigateAction in project applause by applause.
the class DefaultListScreenClassExtensions method targetNavigationScreen.
public Screen targetNavigationScreen(final Screen it) {
ScreenListItemCell _defaultCell = this.defaultCell(it);
EList<UIAction> _actions = _defaultCell.getActions();
final Function1<UIAction, UIActionSpecification> _function = new Function1<UIAction, UIActionSpecification>() {
public UIActionSpecification apply(final UIAction it) {
UIActionSpecification _action = it.getAction();
return _action;
}
};
List<UIActionSpecification> _map = ListExtensions.<UIAction, UIActionSpecification>map(_actions, _function);
Iterable<UIActionNavigateAction> _filter = Iterables.<UIActionNavigateAction>filter(_map, UIActionNavigateAction.class);
UIActionNavigateAction _head = IterableExtensions.<UIActionNavigateAction>head(_filter);
Screen _targetScreen = _head.getTargetScreen();
return _targetScreen;
}
use of org.applause.lang.applauseDsl.UIActionNavigateAction in project applause by applause.
the class DefaultListScreenActionCompiler method compileActionMethod.
private CharSequence compileActionMethod(final UIAction it) {
CharSequence _xifexpression = null;
UIActionSpecification _action = it.getAction();
if ((_action instanceof UIActionNavigateAction)) {
CharSequence _switchResult = null;
UIActionSpecification _action_1 = it.getAction();
ActionVerb _actionVerb = ((UIActionNavigateAction) _action_1).getActionVerb();
final ActionVerb _switchValue = _actionVerb;
boolean _matched = false;
if (!_matched) {
if (Objects.equal(_switchValue, ActionVerb.ADD)) {
_matched = true;
Screen _screen = this._defaultListScreenClassExtensions.screen(it);
CharSequence _compileActionMethod_AddItem = this.compileActionMethod_AddItem(_screen);
_switchResult = _compileActionMethod_AddItem;
}
}
if (!_matched) {
if (Objects.equal(_switchValue, ActionVerb.EDIT)) {
_matched = true;
Screen _screen_1 = this._defaultListScreenClassExtensions.screen(it);
CharSequence _compileActionMethod_EditItem = this.compileActionMethod_EditItem(_screen_1);
_switchResult = _compileActionMethod_EditItem;
}
}
_xifexpression = _switchResult;
}
return _xifexpression;
}
Aggregations