controller

AppDelegate or AppController

Hi all While reading cocoa tutorials i've noticed that some of the tutorials use AppDelegate and some AppController for defining IBActions that open various windows that use subclasses of NSWindowController. Is there some sort of rule of thumb for this? ...

Group Controllers to functional Packages in Grails

Im developing a Grails App. I have about 20 Controllers right now and there will be more. Is there a way to Group the Controllers in functional Packages? I would like to have something like: grails-app/administration/<controller classes> grails-app/usercontent/<controller classes> grails-app/publiccontent/<controller classes> The best...

ASP.NET MVC - Set Master View accordingly with Controller

Hello There, By any chance, is there any easy way to set a default MasterView for all the actions inside a specific controller? For example If I have the HomeController I want all the actions inside it to inherit the Site.Master as default, but If I am inside AccountsController I want all the action to inherit the Admin.Master and so o...

asp.net mvc: Dynamically add child/sub controllers from a controller.

In asp.net mvc, you can easily call/add a controller from a view, but what is the easiest way to add child/subcontrollers from a controller. What Im getting at is I want to dynamically build a list of child controllers from within the controller itself, not from the view. The pattern I have in mind is derived from the old ibuyspy porta...

Deriving a resource from the controller name - plugins?

Just wondering if there is a plugin out there that abstracts the process of deriving the instance of a current resource (or its class) from the current controller name? Currently I just classify.constantize the controller name, and if that works then I test for the id paramater and load the record if it exists. Yea, maybe it's a bit we...

How can I redirect the default home page to another page in CakePHP?

I need to redirect the default CakePHP home page / or (/pages/home) to /users/dashboard page I tried Router::connect('/', array('controller' => 'users', 'action' => 'dashboard')); and Router::connect('/pages/home', array('controller' => 'users', 'action' => 'dashboard')); But both are not working ...

JQuery Tab using ViewModel data...

using asp.mvc & jquery (with ui.tabs): i would like to change the view model before clicking the tab (programatically) but it doesn't appear to be working. i click the tab just fine but the view model's data hasn't changed. here is how i'm doing it: first: i check to see if you are my tab. if so, i check to see if the controller h...

Controller/mini-kernel design pattern in C++

I've looked around for a simple design object in C++ to work from, i understand most of the code involved but i'm rather new to the language so a 'base' to work from would help. Concept is basicly a 'task' class as a base for a jobs to run in a loop. BaseTask class > AudioTask class Controller loop > stores a std list of pointers to t...

Can I share controller of ASP.Net MVC with WinForms Application and how?

I am developing web application using MVC. A lot of efforts are going into the design model and controller. I know I can reuse the modal in winforms. But can I reuse the controller in winforms ...

How to check if a controller exists using Zend Framework

Hi all, I'm writing a plugin for my Zend Framework app and want to do a quick check to see if a controller exists. Can anyone point me in the right direction? ...

What do I put in the config.xml file to override linkAction in Downloadable (Magento controller)?

I'm trying to override the linkAction method so that I can serve up downloadables in S3, etc. ...

ASP.NET MVC Controllers properly initialized when testing

How do I get an ASP.NET MVC controller properly initialized for an integration test? My current problem is that when I try to access the User member of a controller I get: System.NotImplementedException: The method or operation is not implemented. What I want is what Ruby on Rails provides out of the box with the Functional Tests....

combining edit and age view page into a single Action

In my controller, I check for a articleID in the querystring, if it is present, I will render the edit view page, otherwise I will render the add view page. Now in my edit page, there are times when certain classes in my ViewData might be null. Put I want to pre-populate textboxes in the edit page. How can I prepopulate text into fiel...

MVC How to keep a model skinny

After watching this video, I am wondering if I am using my controllers wrong. What exactly should a controller contain? For my blog, I have a post controller which has methods: create show list loadPost like dislike Whereas my post model only has a few access rules, validation rules and relation information. Are there any examples of a...

MVC Route Question

Hi, I am trying to map an action with no controller to a specific action, However, I do not want to show the controller in the URL. I have partially achived this using the mapping shown below: routes.MapRoute( null, "Contact", new { controller = "Home", action = "Contact" }); This successfu...

Invoke action to send email in ruby on rails

I am attempting to send an email to the present borrower of a book. I've created an ActionMailer called ReturnRequestMailer which has a method called please_return. class ReturnRequestMailer < ActionMailer::Base def please_return(book_loan) subject 'Book Return Request' recipients book_loan.person.email from 'andr...

Using a System.Guid as primary key in ASP.Net MVC?

I have created a table in the database that has a System.Guid as it's primary key. The required ADO.Net Entity Framework model has been generated and the required stored procedures has been mapped. I created a new controller and added the basic required code for Create and Edit for the data. However when the clicking on the link to edit...

.NET MVC instantiate controller inside another controller

Is it possible for an ASP.NET MVC controller to create a new instance of a different controller and effectively delegate resonsibility to that? Let's say for example that I have two controllers in the /Controllers/ directory: public class HomeController : Controller { public ActionResult Index() { var otherControlle...

new control().ResolveUrl("") not working on deployed.

Hello guys, I have an application using MVC. In my controller I have their a viewdata[] which contains the image path (Viewdata["dd"]=new Control().ResolveUrl(path)). This will work on my local but on the deploy it will not work anymore. Anybody have experience this scenario? Your reply is greatly appreciated. Best ...

iPhone: adding segmented control to toolbar instead of buttons within navigation controller?

hey all, im new to iphone programming so if you could help me out I would appreciate it- i have been all over the web and cant find the answer to this. my current setup is like this navigation controller in MainWindow.xib > View in navigation controller in MainWindow.xib calls RootViewController.xib > RootViewController.xib contains a...