mvc

What is a role in a QTreeWidgetItem?

I have a QTreeWidget with several Columns; I add QTreeWidgetItems to it. I try to make the second column contain a numerical value for each Item so I can sort the items by this value QTreeWidgetItem has a method called setData(int column, int role, QVariant(data)) I cannot find any documentation on what this role argument is. All I kn...

MVC - Ajax form - return partial view doesnt update in <div> target

I have an index view that I want to update automatically as the user types in a client id. I got something similiar to work (only it was updating just a label) - but this will not work. What happens is the partial is just rendered by itself (not in place of the UpdateTargetID). So the data is rendered on a new page. Here is my code: Co...

Atomik MVC - Console plugin

Hi folks! php index.php generate about Atomik 2.1 Console PHP Warning: require(): Filename cannot be empty in /srv/www/vhosts/firedwire.com/httpdocs/atomik/app/plugins/Console.php on line 100 PHP Fatal error: require(): Failed opening required '' (include_path='.:/usr/bin/PEAR:.:/usr/share/php5:/usr/share/php5/PEAR') in /srv/www/vho...

RedirectToAction - but I want it to go to http://site.com/controller/action/id?

I'd like to move an asp.net mvc response to http://site.com/emails/list/[email protected] Using RedirectToAction("list", "emails", new { id = "[email protected]"}); takes you to http://site.com/emails/[email protected]. What am I doing wrong? Thanks, Rob ...

How to deal with animating in-between states when the model is discrete

The data model in my program has a number of discrete states, but I want to animate the transition between these states. While the animation is going on, what the user sees on the screen is disconnected from what the underlying data is like. Once the animation is complete, they match up again. For example, let's say we have a simple gam...

Spring Security UserDetails Best Practice

I am using my own implementation of the UserDetailsService interface to load a User object from the Database and place it as UserDetail into my SecurityContext. The User object is then a detached Hibernate object. When I want to access lazy load relations of the authenticated User I need to get it from the SecurityContext and attach it ...

Spring MVC Domain Object handling Best Practice

Lets assume a simple Spring MVC Controller that receives the ID of a domain object. The Controller should call a service that should do something with that domain object. Where do you "convert" the ID of the domain object into the domain object by loading it from the database? This should not be done by the Controller. So the service m...

Where to place heavy jQuery code in web development MVC pattern?

I'm building a website where many of the pages are very interactive without having any communication with the web server. Basically, a page represents a kind of DHTML interface, where users can click on various divs to move them around and perform other actions. In the end, the user is able to save the "state" of all divs on the screen a...

Vb.net Model View Control

Does anyone have a good website for the basics of using Model View Control pattern with either vb.net or C#. Thanks ...

Generating forms from models (a la django ModelForms) in Objective-C

I'm taking the plunge into iPhone development after about two years working with django. As I've done tutorials and read documentation, one of the things that strikes me as inconvenient about the various libraries used in iPhone development is the amount of repetition required when creating user input forms for data models. I know of...

tips to avoid synchronisation issues in multiplayer and replays using MVC pattern

Hi, just wondering what tips people have for avoiding game synchronisation issues in multiplayer games and replays recorded off of game logic using the model in a model view controller pattern so far im aware that its not a good idea to give non const access to the model anywhere outside of it, but apart from that im a little stuck and...

Generating urls form MVC Routes in a Management layer...

So... I have a business object/manager which is going to generate emails. These emails will contain links to various content on the website... and therefore needs to understand about MVC routing.. or at least how to generate URLs for the website... However my business object will not have access to a RequestContext etc and the email ge...

Layering PHP Applications for other DBMS

I'm currently on my way to write a web application implementing the MVC and well reducing complex things. Yet I've been pondering for a few hours what to do for future database systems like Oracle, PostgreSQL, Firebird, etc. Then again to implement these adapters in the logic is what gets me, should I just trigger-happy it with tons of...

Separate controller for home/index site in cakephp? Best Practice?

Hi, I´m starting to developing with cake php. I have designed a DB model and baked my mvc´s. Now i want a index / home site. This site should be an overview of possible actions which a user can do. Should I use an app_controller for that or route to an existing controller even if that controller has nothing to do with a home site, or ...

MVC Design pattern smells?

I must have implement MVC dozens of times in the context of various toolkits. I've noticed there are a few things that keep cropping up in the implementation which I'm not completely comfortable about. I was wondering if these are indeed things I should be looking to avoid. For instance The eternal Model instance - In an Single documen...

Lazy loading relationships in Django (and other MVCs/ORMs)

Interested in knowing how lazy loading is achieved in frameworks like Django. When is the decision made to perform the join? And is there a way to force eager loading in Django? Are there times when you would need to force Django to eager load? ...

Return to calling page from a shared page

I have a shared page in my ASP.NET MVC app that can be accessed from several different pages in my app. If I want the user to return to their original page after they have done their business on the shared page, what's the best way to figure out where the user was, and tell the app to go there? Note that I'm currently doing this for the...

How to access HTML files from ASP.NET MVC VIEWS Folder

Hi All, I will like add conventional HTML page under VIEWS folder (in ASp.NET MVC) page. I have added the route exceptions as mentioned below. routes.IgnoreRoute("{resource}.htm/{*pathInfo}") routes.IgnoreRoute("{resource}.html/{*pathInfo}") Although it does work when I put the html files out of VIEWS folder but I get Page ...

JSP EL and Scriptlets - How to Avoid mixing jstl and scriptlet vars

Accessing non-properties via jsp el In the code below, I need to access a method that is not a property. I need a c:foreach variable to be visible to be the test as well. I'm dealing with someone else's code. I'm not particularly happy with the design of it, but that's easy when dealing with someone else's code. I would prefer to ju...

MVC treeview (UL & JQuery), how to save state

Hi there, I have a treeview (using an unordered list and JQuerys treeview) in my MVC app and i am wondering the best way to keep the nodes open and close state persisted on postback? ...