mvc

Remove the default interface CakePHP links in default Cake apps?

How do I get rid of the default "CakePHP: the rapid development php framework" link that shows up on the top left on every page of Cake app's with default configurations? It's not part of the view, and the only way I can think of is to display:none the div in the CSS. I'm thinking there has to be some setting in the app's configuration....

ASP.NET or ASP.NET MVC or Silverlight or a mixture ?

I want to start to implement a new web application (with many user interactions) from the scratch. I have 2 years experiences with ASP.NET. Now Microsoft offers ASP.NET MVC. I have read a little about the concepts behind, but I am not sure if I should use the classic ASP.NET variant or the new one. Perhaps it makes sense to mix it ? Or s...

How to identify the Actionfilter used in a Controller Action Method?

OnActionExecuting triggers when an action is about to execute. If my action has actionfilter [myCustomActionFilter] public ActionResult MyAction() { //implementation } Is it possible to determine (inside the OnActionExecuting event) that an action has myCustomActionFilter applied into it? ...

How to face observable object containing an observable field

Hello, I need a hint concerning MVC and Observer-Pattern. For example a model contains the classes "Address" and "Person". The Address class contains the fields street:String, zipcode:String, location:String. Whereas the Person class contains the fields name:String, firstName:String, address:Address. My approach so far looks something ...

Reading membership section from web.config in C#

Hi there, I have created a custom MembershipProvider class, so far so good, however, I am not sure how to read the configuration settings from the web.config file. I tried to search from Google and Stackoverflow, seems like someone also experiencing my problem and asked, but no answer has been given. It should be a simple thing, but ...

Common MVC 2 Pitfalls

I'm surprised this hasn't been asked before...or maybe I just don't see it. Anyway, I'm finally straying from the comfort of ASP.NET Web Forms and exploring the world of MVC2. I've done the nerdinner walk-through and it was fairly straightforward. Now I am getting a little more adventurous and building an MVC2 app on my own and would li...

How 404 error asp.net mvc 2 IIS 7?

Hello! I tried to catch 404 errors like this... But when i try to load http://localhost:11415/wfwe/wefwe/ - all good work. When i try to load http://localhost:11415/order/ - fail (with error The RouteData must contain an item named 'action' with a non-empty string value.) When i try to load http://localhost:11415/Images/ - fail with ...

ckeditor jquery integration

can some one guide me to a good tutorial for jquery ckeditor integration? ...

MVC2 DataAnnotations on ViewModel - Don't understand using it with MVVM pattern

I have an MVC2 Application that uses MVVM pattern. I am trying use Data Annotations to validate form input. In my ThingsController I have two methods: [HttpGet] public ActionResult Index() { return View(); } public ActionResult Details(ThingsViewModel tvm) { if (!ModelState.IsValid) return View(t...

Accessing controller methods inside a model with Kohana/MVC Framework

Hi all, I need to able to access controller methods from a model using the Kohana V2.3 framework. At the moment I'm passing the controller object (by ref.) to the model on creation which works perfectly fine but I can't help think there is a more "cleaner" way - does anybody have any suggestions? Would Kohana V3 resolve this with its HMV...

IQueryable Where fails to work

I am using N-Hibernate and have a class/table called Boxers I also have a prospect table which tells use if the boxer is a prospect. (this table is one column of just the boxersID) So i Want to get all boxers that are prospects (meaning all boxers that have there id in the prospects table) Public static IQueryable<Boxer> IsProspect(th...

MVC Framework for existing application.

I am modifying existing java web application that was written long time ago, and it is written in the wrost possible way. It has business logic and sql statemens in JSP files. Because of the certain constraint, I can not re-design the entire application. but I can implement better design in any new feature that I add. can anybody sugge...

Help dealing with data dependency between two registration forms

I have a tricky issue here with a registration of both a user and his/her pet. Both the user and the pet are treated as separate entities and both require separate registration forms. However, the user's pet has to be linked to the user via a foreign key in the database. The process is basically that when a new user joins the site, first...

Should a service layer return view models for an MVC application?

Say you have an ASP.NET MVC project and are using a service layer, such as in this contact manager tutorial on the asp.net site: http://www.asp.net/mvc/tutorials/iteration-4-make-the-application-loosely-coupled-cs If you have viewmodels for your views, is the service layer the appropriate place to provide each viewmodel? For instance,...

Rails MVC Best Practices for Website Modules

I am just beginning to build my Rails application and thus far I've followed a RESTful design and it's proven much easier to understand and organize the code and structure of the application. I have things like posts and comments. However for the front page. I want to display all the latest posts but also may be in the sidebar display th...

ajax onsucess method context

function createSuccess(context) { $get(“result”).innerHTML = context.get_data(); } <% using (Ajax.BeginForm(new AjaxOptions {OnSuccess="createSuccess"})) {%> What does context holds in the createsuccess method? data return by controller? How do we return json data in the createsucess if so ...

Where should I put code that retrieves model information for site-wide pieces of the view?

Background In many of the websites I work on, there's a header/footer/menu that is created from data from the model layer. This piece is present on every page of the site. Usually, it's part of the "layout", whatever that means for whatever framework I'm using at the time An example of this would be a list of categories in the page foo...

Second time real value post problem

I have added ckeditor on my page. the thing is that when i make changes in the value in the ckeditor and post the value to the controller the new posted value is not there (the previous value is coming). the new value comes on posting it second time.the cycle goes on(the changes in the value in the ckeditor comes on the second posting). ...

Passing variables from Model to Model in codeigniter

Hi, I need to pass a variable to model, that model needs to send another back and use that variable to query a different model. EG: I have a product_ID which I send to the product model, From that I find out the supplier_ID. I want to grab that supplier_ID to the supplier model to get the supplier name. How do you implement this in ...

get and set for class in model - MVC 2 asp.net

Hi there, I want to improve the program so it has a proper constructor but also works with the models environment of MVC. I currently have: public void recordDocument(int order_id, string filename, string physical_path, string slug, int bytes) { ArchiveDocument doc = new ArchiveDocument(); doc.order_id...