Beispiel #1
0
 public override void execute(AnomalousMvcContext context)
 {
     if (LinkName != null)
     {
         NavigationModel navModel = context.getModel <NavigationModel>(NavigationModelName);
         if (navModel != null)
         {
             NavigationLink namedAction = navModel.getNamed(LinkName);
             if (namedAction != null)
             {
                 context.queueRunAction(namedAction.Action);
             }
             else
             {
                 Log.Warning("Cannot find named navigation link '{0}' in navigation model. Has it been setup properly?", LinkName, NavigationModelName);
             }
         }
         else
         {
             Log.Warning("Cannot find navigation model '{0}'. Has it been setup properly?", NavigationModelName);
         }
     }
     else
     {
         Log.Warning("Link name is null. Cannot navigate.");
     }
 }
        public override void execute(AnomalousMvcContext context)
        {
            NavigationModel navModel = context.getModel <NavigationModel>(NavigationModelName);

            if (navModel != null)
            {
                NavigationLink previousAction = navModel.getPrevious();
                if (previousAction != null)
                {
                    context.queueRunAction(previousAction.Action);
                }
            }
            else
            {
                Log.Warning("Cannot find navigation model '{0}'. Has it been setup properly?", NavigationModelName);
            }
        }
Beispiel #3
0
        public override void execute(AnomalousMvcContext context)
        {
            NavigationModel navModel = context.getModel <NavigationModel>(NavigationModelName);

            if (navModel != null)
            {
                NavigationLink namedAction = navModel.getAt(Index);
                if (namedAction != null)
                {
                    context.queueRunAction(namedAction.Action);
                }
                else
                {
                    Log.Warning("Cannot find navigation link at index '{0}' in navigation model '{1}'. Has it been setup properly?", Index, NavigationModelName);
                }
            }
            else
            {
                Log.Warning("Cannot find navigation model '{0}'. Has it been setup properly?", NavigationModelName);
            }
        }
        public override void execute(AnomalousMvcContext context)
        {
            NavigationModel navModel = context.getModel <NavigationModel>(NavigationModelName);

            if (navModel != null)
            {
                NavigationLink namedAction = navModel.getLast();
                if (namedAction != null)
                {
                    context.queueRunAction(namedAction.Action);
                }
                else
                {
                    Log.Warning("Cannot find a last element for navigation model '{0}', which means its empty. Has it been setup properly?", NavigationModelName);
                }
            }
            else
            {
                Log.Warning("Cannot find navigation model '{0}'. Has it been setup properly?", NavigationModelName);
            }
        }