mvc

Asp.net MVC Routing Type

i have 2 views in my App 1:Views->Season->ViewSeason 2:Views->Admin->Season->ViewSeason How i write Controller for this? pls help me..... ...

HTML helpers throw exception on accessing property when dbnull

Hi, I just upgraded my project to ASP.net MVC RC. The bad thing is HTML helpers are throwing exceptions from the dataset even when I pass a new datarow. Error is as a result of conversion to dbnull from .net object types. This exceptions occurs on my UI. I do check for DBnull on update but not when binding. MVC beta wasn't behaving as ...

What are the advantages of Apache Wicket?

I'm not a Java developer so I might get some terms wrong... but. An application I integrate with is moving from Spring to Wicket. While it should not affect my integration with it I got to wondering why they would do this? From what I know Spring is the more popular framework. I know nothing about it except it's popular. I did read ...

Progress bar and multiple threads, decoupling GUI and logic - which design pattern would be the best?

Hello, I'm looking for a design pattern that would fit my application design. My application processes large amounts of data and produces some graphs. Data processing (fetching from files, CPU intensive calculations) and graph operations (drawing, updating) are done in seperate threads. Graph can be scrolled - in this case new data...

Java Applet - MVC - How to bind model to view?

What's the easiest way to build an applet that has a view with components that are bound to model data and update when the model is updated? Ideally as little code as possible, preferable none/declarative :) If a component type is needed for explanation, please consider a JLabel whose text is bound to a bean with a String getText() acc...

How can you organize the code for a game to fit the MVC pattern?

Hi all, I'm a freshman in college going for my computer science degree... I've programmed plenty the last several years but just lately I've been getting more into theoretical ideas about organizing code, design patterns, differences in languages, etc. I have a Java class, so I've dropped my C++ research/development and moved into Java...

Encode dataview value in ASP.NET MVC Actionlink

I am using the Microsoft Ajax Template DataView to bind values to a template. I can do this and it works as you'd expect: <h3>{{ID}}</h3> <p>{{Address}}</p> However I am trying to build an action link that has the ID in it. <h2><%= Html.ActionLink(Html.AttributeEncode("{{Name}}"), "Index", "Restaurant", new { Id = Html.AttributeEncod...

MVC RC Validation: Is this right?

I'm just trying to do some simple validation in MVC RC and am getting an error. For the purposes of this question, I am not using the UpdateModel. Here is the code in the form: <%= Html.TextBox("UserId")%> <%= Html.ValidationMessage("UserId") %> If I add the following line in the controller, I will get a NullReferenceException on th...

JavaScriptResult in asp.net mvc RC1

Why do you need JavaScriptResult as a response? Doesn’t it break the pattern of clean separation of concerns? Can you suggest me some cases where this will be useful? ...

ASP.NET MVC Complex Views

I have a question about complex views in ASP.NET MVC. Where can I find good examples or best practice information on complex views and how best to create them in ASP.NET MVC. I know the basics, but peppering the HTML with complex dynamic HTML and/or jQuery seems to be messy. Any links to enterprise best practices or examples from expe...

MVC & Date Formatting

Hi, Where in an MVC based architecture should the date formatting (long/short/time/no-time/UK/US) live? I want to be able to specify long/short/time/no-time on a per-field basis - i.e. DateOfBirth doesn't care about time, but CreationDate might. Using ASP.NET MVC, there doesn't seem an easy way to do it in the View, which makes me won...

How would I generate / parse this RESTful url in codeigniter

I'm new to MVC, being RESTful, and CodeIgniter and I'm trying to get into it in my spare time, so this is largely an academic question. I'm trying to build a url that will display the availability of a particular hotel room, for a particular hotel. I figured the RESTful way to do this would be http://url/Hotel/2/RoomAvailability/3/ ...

ASP.NET web forms as ASP.NET MVC

I am sorry for possible misleading about the title, but I have no idea for a proper title. Feel free to edit. Anyway, I am using ASP.NET Web Forms, and maybe this isn't how web forms is intended to be used, but I like to construct and populate HTML elements manually. It gives me more control. I don't use DataBinding and that kind of s...

One view ( frontpage ) for many controllers (sub views)

Notes: Cannot use Javascript or iframes. In fact I can't trust the client browser to do just about anything but the ultra basics. I'm rebuilding a legacy PHP4 app as a MVC application, with most of my research currently focused with the Pylon's framework. One of the first weird issues I've run into and one I've solved in the past by us...

Html.RenderAction. Why is it not included in MVC RC1?

I am torn between the idea of using Html.RenderAction vs. Html.RenderPartial for partial views. Using RenderPartial means manipulating and passing ViewModel, something I feel is cumbersome. RenderAction is neat and concise in this case but not included for RC1 (included with futures though). Why is it so? Any specific reason? ...

How do I bind to a specific array element in ASP.NET MVC?

I'm using ASP.NET MVC RC1 and trying to bind a textbox to an object property like so: <%= Html.TextBox("Comments.Contacts[0].ContactName") %> It seems like it should work, since this does: <%= ((MuralProject)ViewData.Model).Comments.Contacts[0].ContactName %> But alas, the result in the textbox is an empty string. Am I doing someth...

generate scaffolding as code in cakephp

I have a cakephp app with some controllers using scaffolding for the logic and views... How can I make cake actually generate those as files and functions in my project that I can then modify and take ownership of... It's nice to have this stuff as a starting point, but it can't be true that I need to start basically from scratch if I ...

MVP Pattern: should multiple Presenters be decoupled or can they communicate directly?

I have a ui that looks like this: +--------+---------------+ | model1 | model details | | model2 | here, | | model3 | loaded as the | | | user selects | | | a model from | | | the left. | | | | +--------+---------------+ I'm using the MVP patte...

How does Magento code work?

Can someone show me how to accomplish the following in Magento: Display a hello world message using a controller/view/model approach, so if i went to http://mysite.com/myController It would show the string 'hello world'. Being able to show this string within the template of my website (e.g the header, footer, etc) will be a bonus. ...

Do you have links to any tutorials on setting up MVC on Amazon EC2?

Please share links to tutorials on how to set up and run ASP.NET MVC on an Amazon EC2 virtual machine. I know that it's possible, but I'd like to follow behind someone else that's already set it up and has it running. It'd be great to know of a EC2 bundle that already has everything set up as well. ...