mvc

is heredoc a good way to implement mvc?

Is Heredoc in MVC a good way to begin my foray into separating layers? I read one place it could be use and another that heredoc had more problems than it solved. ...

How should you handle exceptions that occur below the level of the Controller in a Spring MVC web app?

Let's say you've got a Spring web app with a structure like this: com/ myapp/ controller/ model/ service/ How should you handle exceptions that occur below the level of the controller? Should you make methods in the Model and Service layers throw their exceptions up to the Controller layer? What to...

How to extract data from a HTML.TextArea contained in a foreach loop using JQuery or other means

Hello Everyone. I am new to jQuery. I have a Html.TextArea called "CommentPost" displayed for each item in a foreach loop. I am trying to return the data typed into my text area as a parameter in my ActionLink call. The first parameter item.CommentId get populated correctly but the second one item.CommentPosting evaluates as null. I t...

intergrating a MVC (php) Framework with a CMS

Is there a way to build a large-scale, multi-user (meaning users can register and login) web application / website with a php framework like symfony (MVC pattern) and intergrate a CMS like wordpress to manage the site? My desired goal is to use wordpress to manage the content of the site, and quickly and easily add new features to site ...

Multiple Dynamic Views from same server

We have a requirement to generate multiple dynamic views out of same server. We have java based application which is deployed on Tomcat. Now we want to create view layer. View should get generated based on the device. Example, for PC users,view generates Flash/Flex contents, for iPhone users, it generates HTML content, for Roku users it ...

Is this acceptable to be placed in a view?

Kohana (and probably other frameworks) allow you get a route and echo its URL, creating routes that are easy to maintain. <a href="<?php echo url::base() . Route::get('contact'); ?>">Contact</a> Is this OK to have in the view, or should I assign it to a variable, and then pass the view the variable? Thanks ...

Import data to MySql from excelsheet to DB in MVC

Hi All I need a favor.I want to import data to MySql DB from excel sheet IN MVC.net.I didn't have any idea about this. Any help will be appreciated. ...

Size of element depending on size of the QListView

Hello. I developing a program that draws in elements of the list (QListView). How do I set the size of an element depending on the size of the QListView? I write implementation of the sizeHint in the delegate, but where to get the size of the instance QListView I don't know. ...

If(ModelState.IsValid==false) return View(); or View(model); ?

When validation fails, which one I should return? View(); or View(model); ? I notice both work. It is confusing. EDIT: public class MoviesController : Controller { MoviesEntities db = new MoviesEntities(); // // GET: /Movies/ public ActionResult Index() { var movies = from m in db.Movies ...

baking with PHPcake correct database naming

Just gettign into MVC developement and cakes implimentation, so I'm getting confused with table naming and id references. I hava a table called Assets and value sotered in Assets is asset_status_id field which is meant to be a reference to the table Asset_Statuses this table is a simple list of possible statuses the assets could be in a...

PHP mvc vs layered design

Hi, I have some questions regarding MVC that I would like to clarify. At our company we use two in-house developed frameworks for building PHP applications. One is an MVC framework while the other uses a 3-tier design with a presentation layer, a logic layer an a data access layer. We find the 3-tier design more "object oriented friendly...

Magento - How do I use a shopping cart price rule to display a cms block?

I would like to use a shopping cart price rule to display a cross sell message rather than setting a discount. For instance, if a certain item is in the cart, display the promotional message in the cross sell area. Specifically, we have jacket and pants that can be purchased separately. But when purchased together, the customer can sa...

What deletes the widget created by a custom QItemDelegate

Working with the Qt ItemViews the editing widget of an item can be modified via a QItemDelegate that can create a custom editor via createEditor. Who is responsible for deleting the instance created by the delegate. I could not find any documentation that explained this, if you just point to the appropriate section that is fine ...

Jquery problem executing many rows

I have a problem using Jquery. I do this: $("#ID_ESTADO").change(function() { document.getElementById("inprogress").style.visibility = "visible"; document.getElementById("ID_CERTIFICADO").setAttribute("disabled", true); var url = '<%= Url.Content("~/") %>' + 'Certificado/ObtenerCertificados/'; $.getJSON(url + $(...

Link isnt working when positioned with a background image?

I've got this link <a href="/Admin/Product/Brands" class="newButton"></a> Without the class attribute and a little bit of text, the link works fine, but when I add the class to apply the background image and position the button, the link stops working. It gives no errors in the firefox console either. Any ideas? Heres my css rule for ...

Rapid Java Shape Manipulation

My team is short on time in implementing a simple shape editor. We have to be able to create, delete, move, and copy simple shapes like rectangles and lines. This has to be a stand-alone application (may not use applets). We've fully implemented our model underpinning the application, as well as the controllers. Any advice? Edit: This i...

Model Binding to view in MVC

Hi Team, I am a beginner to MVC and would like to know how I can set by binded model vaule back for viewing. Here is the example. public class DataTypes { public Guid ItemID { get; set; } [Required()] public string Name { get; set; } [Required()] public string Status { get; set; } [Required()] public DataMod...

Configuring a simple WCF Service Endpoint in a ASP.NET MVC 2.0

I'm building a simple ASP.NET MVC 2.0 web application. I'd like to serve up a AtomPub endpoint so that I can publish/update content from Windows Live Writer. I originally went down the path of implementing the AtomPub protocol as an Controller with a set of custom ActionResults. That worked until I tried to get authentication working, wh...

Error signalling in ELMAH not working with ASP.NET MVC

My understanding is that raising an errorsignal should log my error or hit the custom HandleErrorWithELMAHAttribute class(taken from this example) ,But it does neither. I am using the HandleErrorWithElmah decorator for the controller in question.The error logging works when it comes to unhandled exceptions in the controller(I am explic...

c# Forms - MVC frameworks?

I need to develop a forms application with a DB backend. In future this may be linked to ASP.NET page. I was thinking of doing this as an MVC and reuse later. So, What kind of MVC frameworks do you use? I am interested in building forms quickly and any frameworks that link/bind control to database fields. ...