mvc

My Ajax is trying to render a view that it shouldn't..

So everything works. But if a user has firebug's console open, they'll see a bug. :D When my AJAX is sent : $(".remove_qf").live("click", function(){ $.ajax({type: "POST", url: $(this).attr("href"), data: { '_method': 'delete' }, dataType: "script"}); return false; }) And my controller fires it : def destroy @quick_fact = @org...

Where to store values, for transport to the business layer?

Imagine a hypothetical object with a number of attributes: pseudocode: class Student { Name: String; Birthdate: DateTime; Height: int; //inches GPA: float; //"Grade Point Average" Citizenship: string; } Now the user enters in values, and the object gets them: Name: Shelby Lake Birthdate: 6/19/1991 Height: 63 GPA: 5.6 ...

jQuery Invalid Argument 5899 in IE

I tried using the Moving Boxes jQuery Plugin in Asp.net Mvc. It works in every browser except for IE. Heres the plug in code. I was wondering if somebody has an idea on what might be different in IE, possibly something along the lines of the way IE parses widths? or fixed widths? $(function () { var totalPanels = $(".scrollContainer")...

ASP.NET MVC 2 Use Ajax to reload a UserControl

Hi, is it possible to use Ajax with ASP.NET MVC 2 to reload a user control, pass along a new Model and have it update all the values that make use of this model without refreshing the rest of the site content? ...

How do you customize/style codeigniter errors?

I'm trying to customize the CSS/HTML for error message displays in codeigniter so I can apply a tag too each and style them up. I tried to Google this and search the manual but must have been searching for the wrong terms - can anyone help me out? ...

ASP.Net MVC checkboxes in filter

I'm creating an action that will retrieve database records and filter these results based on one or more industries selected by the user using checkboxes. The form method is set to "get" and each checkbox has the same name. As a result, the querystring has a key/value pair for each selected industry id and I'm getting these IDs into the...

in MVC, where do you draw the line between a controller and model?

I've seen code written where almost all non-route related code is passed to a model. I have also seen code where all database persistence is handled by a model, but non-DB processing is handled by the controller. Which is the better approach? ...

Spring MVC annotation preload form

I am a newbie to spring mvc annotations. Which is the best way to load data into a page that has say a string, list (list of country for a drop down) and some form elements like name and address I see two possible ways @ModelAttribute on a method - can be used for string, list, initialize the form elements Put the string, list into Mo...

accesing html form array inside javascript

how can i access an array, defined in the form, inside javascript. e.g i have defined an integer array inside the web form like <% using (Html.BeginForm()) { int[] ctid = ViewData["ct"] as int[]; var x = 0; %> now i want to access this array(ctid) inside javascript, how can i do that... plz help ... ...

Safari calls my controller twice when loading the JSP

Doesn't happen in Firefox. I deactivated the extensions. didnt help. Version is 5.0.1. Any ideas? ...

Understanding MVC architecture as non-MVC-developer

Hi folks, I have a problem with the understanding MVC architecture. It's not that I don't know anything about MVC. Everything makes sense to me in a MVC architecture but if I want to start to develop my app in an MVC architecture I'm stuck. Basically there are a lot ways to do what you want in the programming world but I want to do it ...

Document Sharing App With MVC

Hello, I have been assigned a new task by the client, a document sharing application to be made as per MVC design pattern. Here are the requirements: Uploads and downloads files with a browser Store the document in db if that are more secure documents else store on the directory with options of password enabled or accessible with out ...

Is this a correct way of using MVC in java?

I have a model with a reference to the view, a controller with references to the model and view, and a decoupled view, with no references to the above. The controller has all the listeners of the view, and takes care of events by calling methods on the model and view. The model calls methods on the view in some of it's methods. Is this...

Different css files based on web.config setting

I'm using asp.net MVC2 and trying to select css file based on a setting. Index controller gets it from web.config Dim vCountryCode As String = ConfigurationManager.AppSettings(MyAppConstants.DEFAULTCOUNTRYCODE.ToString) SessionHelper.SetCountryCodeSession(vCountryCode) site.master looks like this: <% Dim CountryCode As String = Me.S...

How to get the url to the current action (after modifying some route data)?

I'm localising a site via a Change Language control in the master page. I need to render the control with the current url you're on in each of the different languages. So if you're on http://site.com/en/Home/About and you change the language to french, I need to direct you to http://site.com/fr/Home/About. The localisation code works o...

Accessing ViewData from Partial using Steve Sanderson’s code

I have used steps in Steve Sanderson’s blog to validate the list. Now I have a problem of not able to access ViewData in my partial with this code. I set the ViewData in my action before calling AjaxViewResult but also I getting error while accessing the ViewData. Can someone tell me how to do it? ...

Running MVC2 Application on IIS 5.2

I recently created an MVC2 application. I am having trouble bringing it up on a Windows 2003 Server running IIS 5.2. My developing machine is Server 2008, so no problems there. Changes I made on Server 2003 is Creating a Wildcard Script Map of * and pointing that to: c:\windows\microsoft.net\framework\v4.0.30319\aspnet_isapi.dll I ...

Joomla: How to show menu-specific parameters for a non-MVC component

Hi, I built a Joomla 1.5 component, non-MVC, and it's working fine, so I'd rather not change it to MVC. I need to have some menu items point to my component, each menu item passing different parameters to the component. The 'Menu item specific parameters' section in http://docs.joomla.org/Component_parameters is pretty clear, except tha...

Should the View in MVC have its own class?

I'm a bit confused about the MVC paradigm in relation to iPhone development. Currently, I'm splitting the app into: Model (FooModel.h, FooModel.m) View (FooView.xib) Controller (FooController.h, FooController.m) But should I instead use for the View a subclass of UIView (FooView.h, FooView.m)..? It's just a simple game app. ...

Extending the RangeAttribute in MVC 2 (DataAnnotations namespace) to have a variable date range based on today's date

Has anyone extended the Range attribute to be able to have a variable range? I have a similar need but I can't make this work: public class YearRangeAttribute : RangeAttribute { public YearRangeAttribute() : base(typeof(DateTime), DateTime.Now.AddYears(-100).Year.ToString(), DateTime.Now.AddYears(-14).Year.ToStr...