mvc

Symfony variable passing from action to view

Hello I have the following proble: I have the action class of a view in Symfony, action.class.php, in there i have this code: foreach ($images as $i => $img) { if (strstr($request->getFileType($img), 'image')) { $enter = true; $name = Util::processImages($request, $img, 'app_uploads_temp_dir'); if ($name != '') ...

Simple 3D app Design Pattern

Im attempting to convert a simple 3D room explorer/configurator app that is a hacky mess into something a little better. I have now begun separating it out using an MVC pattern, but have found a major performance decrease. I think this is down to the Controller updating the camera parameters in the Model, which is then notifying the vie...

View rendering problem

Hi guys, In my application I have two Master pages and they are used in various different cases. Say one master view just renders the top half of the page and another master view that renders the top half plus a navigation bar to the side. We pass around data to these Master pages using view models Now in my controller my index action ...

spring mvc security. user login on every page

I want to store user information after logging in and to display my login and username on every page (using jsp). How can I get access in my jsp views to the session bean that would store information of the user that is logged in? ...

HttpHandler for Asp.NET MVC application

For general ASP.NET WebForms applications, the web page derives from Page class which implements IHttpHandler that servers actual web request. In ASP.NET MVC the webpage base class is System.Web.Mvc.ViewPage that also derives from Page class which in turn implements IHttpHandler. But in the ASP.NET MVC Razor, the "cshtml" file derives ...

Asp.NET MVC - Difference between ViewPage and WebViewPage class

Waht is the difference between ViewPage and WebViewPage in ASP.NET MVC? ...

ASP.NET MVC, forms auth or custom when using EF 4?

Hello, I'm new to the ASP.NET world. Since I want to use the ORM it seems I would want an Entity to represent the User or Member or whatever, not some data tucked away by the forms authentication api. In fact I don't see how I can live without one. How do people deal with this? Roll your own authentication? Or is there a best pract...

How do I change the records being displayed on the page with buttons on the page (RoR)

I have a rails app that shows statistics based on an employee's daily production. currently my page shows ALL records. I know how to show various different combinations such as records made between two dates etc... but what I really would like to do is make it so that single page (say the index page) has 3 controls that allow for it to...

simplest way to embed Perl in html

Hi all: I've researched online and found several interesting Perl modules/frameworks, such as HTML:Mason, HTML::Embperl, or the MVC Catalyst framework, etc,which can let me embed Perl inside html, similarly like PHP code inside html. However, my Perl project must be uploaded to uni server where only limited privilege and resources are ...

spring mvc annotation validation

I have a form that looks like this public class ValidationForm { private Person person; @Size(min=1,max=10,message="out of range") private String test; //other stuff My validation controller is like this public void processForm(@Valid @ModelAttribute("validateForm") ValidationForm vform, BindingResult result){ My Person ...

ASP.NET MVC2 Apps - Extending App

Here is my problem for using mvc2, I cant find a silver bullet fix for this. I have a standard mvc app which has following views, controllers and Models View WorkOrders Estimates Model WorkOrder Estimate Controller WorkOrderController EstimateController I recently got a client who wants this app with little customization. I am sti...

Kohana 3 module structure question

Hello, everybody! I have a new question about Kohana 3, or rather about a module structure. I develop a small module called Textblock. It's about an ordinary page or a small insertion to the site layout (e.g. a greeting or a slogan, company name). It contains both controllers and models. Models inherit Sprig_MPTT. And one feature I'd lik...

CakePHP: COUNT function on a hasmany association

Hi folks, I'm trying to join a model through a hasmany association and then count the number of records. Basically I have users and projects. I want to display the number of associated projects on the user index action. var $hasMany = array('Project' => array('className' => 'Project', ...

Makin an array of Objects in Objective-C.

Hi guys, Been playing around with Xcode for about 2weeks now, and reading about MVC a bit. I have a problem trying to connect the Model to the Controller because I find it hard to get my head around arrays. I can handle simple arrays when i programmed some in Java but I'm quiet intimidated by the Obj-C NSArrays i see. If somebody woul...

Creating an array of custom objects in Objective C

EDIT What i am trying to achieve with the code, is to create an array of 20 unique 'Person' objects. I know now thanks to the guys below that i am going way off calling dealloc. for (int i = 0; i < 20; i++) { Person *myPerson = [[Person alloc] init]; myPerson.name = @"Brian"; myPerson.age = [NSNumber numberWithInteger:23]; ...

MVC for a UI Heavy App

Is MVC architecture appropriate for an app that is a UI centric app? Example: you want to build a basic flowchart app. Does it make sense to make the GUI components the view, the "node" and "line" objects part of the model, and the click handlers the controllers? It feels weird to me because there is not much functionality in the mod...

Is $view in an MVC php program a proper use of global variables?

I understand that global variables should be avoided generally. As a beginner, I'm trying to understand whether making a $view variable global in a dynamic web program built following MVC principles is one of those cases where globals are a good idea. In my program, I create the $view (as an object that contains an empty array) in inde...

Not able to read the property file

Hi, I am working on one web application in which i want to retrieve values from property files which are present outside of the application i.e on system drive. but while doing this i am facing the problem.Interestingly if i put property files at class path location then application works properly. I am using resin server 3.0.23 and s...

CakePHP: comments plugin help

Hi I'm trying to implement the cakephp comments plugin found here: http://cakedc.com/downloads/view/cakephp_comments_plugin I have a projects_controller which I want to add comments to. Everything has gone fine whilst following the instruction I can add comments and they are saved in the comments table but they are not displaying on ...

How do I return unnamed JSON string array from asp.net mvc2 json result?

I have the following code: var json = MyObject .Select(p => new { id = p.MyObjectId, name = p.MyObjectName }); return Json(new { json }, JsonRequestBehavior.AllowGet); This returns a JSON object as follows: { json: [ { id: 1, name: "Bob" }, { id: 2, name: "Fred" }, { id: 3, name: "James" } ] } However, ...