mvc

fluent Nhibernatetest mappings

Hi there I am using fluent Nhibernate and Id like to write tests for my mappings as shown below I have a scenario where I have a User class, and a UserProfile class The User class is an entity and the UserProfile is a value type, there is a 1:1 relationship between the two. How would I test the mappings based ont this, do I write separa...

asp.net mvc iframe load

how can i load ascx control in asp.net mvc view ? i am using url.action in src but it is not working. Can i do that ...

At a high level, how does struts2 work? I'm coming from a mvc background

At a high level, how does struts2 work? I'm coming from a mvc background Looking at a sample project, I see allot of these ___action type classes. Is it just a action references to a controller action? i.e. a response to a particular url based on get/post? ...

Ninject 2 missing RegisterAllControllersln?

I'm totally a newbie with Ninject and I tried to follow the tutorial by Shiju Varghese at his blog post about DI. I did add reference of ninject.dll and Ninject.Web.Mvc.dll However, I got stuck as Visual Studio cannot resolve the function RegisterAllControllersIn.... protected override void OnApplicationStarted() { Are...

ASP.NET ActionFilters and inheritance.

All my controllers inherit from a BaseController that has an ActionFilter attribute: [AnalyticsData] public class BaseController : Controller {} public class AccountController : BaseController {} Some of my Actions in my controllers reuse the AnalyticsData ActionFilter: public class AccountController : BaseController { [Analytic...

MVCSiteMap Port Problem

Hi Guys, I am using MVCSiteMap - http://mvcsitemap.codeplex.com/ - with Azure and I am trying to figure out how I can get it to remove the PORT number at the end of the generated sitemap. Currently, I am getting http://127.0.0.1:5100/ For this url and all others. Does anyone have any experience with this or know how to remove the p...

CakePHP not setting the $this->Model->id variable

I am currently trying to access the data that was just inserted using: if($this->User->save($this->data)) { $user_id = $this->User->id; #119 ... But I get the error: Notice (8): Undefined index: id [APP/controllers/users_controller.php, line 119] Code | Context if($this->User->save($this->data)) { $user_id = $this->da...

HTML Helper - Reusable View - PHP

Hello.. I am new to PHP and I was hoping someone could help me determine what the best way to go about creating a reusable view would be. What I have is a form that will be used to Add or Edit data. Therefore the view will be identical except in the case of an Edit the form fields will be populated. So I am creating an HTML helper that...

how do I treat html in a loop when using MVC?

Can someone please show me how to do this basic thing using Zend Framework MVC? I'm looping over the timestamp data and populating my table that way. i don't understand how I would pull my presentation HTML from this loop and stick it in the view? Any help would be greatly appreciated! <table> <?php $day = date("j"); $month = d...

How to create new records in multiple tables at the same time ?

Hello all, I was wondering how can I implement a view that allows the user to enter multiple(unknown) number of records in related models.. for example, I have two models called groups and users. And I want to implement a view that allows me to create a group ( which is easy ) and in the same view let me create multiple number of users...

img src c:/imagefolder/imagell.gif

i want to refer an image c:/image/ff.gif/ . how can i do that. i tried with img src but couldn't make it to work. any idea ? ...

cakePHP routing help

Hello folks, Here I am trying to route a page without showing its action in URL, Eg: URL is http://localhost/brands/1/xyz Router::connect( '/brands/:id/:name', array( 'controller' => 'brands', 'action' => 'index', 'id' => '[0-9]{1,}', 'name' => '[a-z]{1,}' ) ); it works fine.... But I nee...

Re-factoring To MVC pattern -Doubts on separation of view from controller

At the momement Im trying to refactor my application (with 1000+ lines of GUI code) to an MVC style pattern. The logic code is already seperate from the GUI so that is not a problem. My concern is seperation of the view from the controller. I understand the basic principal of MVC and this tutorial in the wxpython wiki has been very help...

Which comes first, the framework or the application? Dynamic framework and application folders.

Okay, so I am creating an MVC framework in PHP and I want it to be pretty flexible. This is all fine - I'm working on this at the moment and things are going well (So I don't want to use Zend or another pre-existing framework, haha!), but I wanted to make both the framework and application quite dynamic. I'll try explain: Here's a simpl...

How do I use wild cards (*) in url-pattern with MVC correctly

I am trying to get a servlet to respond to every request with a url-pattern of "/test/*". so this controller should respond to : myApp/test/ myApp/test/whatever myApp/somehting?other=stuff using the following mapping: <servlet-mapping> <servlet-name>test</servlet-name> <url-pattern>/test/</url-pattern> </servlet-mapping> Th...

Modifying view based on ACL in CakePHP

I want to be able to show or hide certain elements in a view based on ACL. For instance, if a user is looking at my Users/index view, I don't want to show a 'Delete User' element if he doesn't have permission to delete users. If he does have permission to edit users, I do want to show a 'Edit User' link. I can hack this together, but be...

Strange Rails 2 Routing Question

I saw this in a rails 2 vs 3 comparison pdf lecture and I'm not sure what's going on with the preview and archived flags. post.resources :comments, :member => { :preview => :post }, :collection => { :archived => :get } Any ideas? ...

Forcing a user to complete additional information

I would like to force a user to complete some additional information once they have created and account and have validated their email address. For now, this additional information is simple (first name, last name). Once a user logs in, I am going to redirect them to an additional information page to complete this information. I'm jus...

Telerik MVC Grid: Setting the Default Sorting direction

Is there a way to specify the default sorting direction for columns in a Telerik MVC Grid? example: click on column 'Date' and it sorts descending, click on column 'Name' and it sorts ascending ...

using telerik grid with jquery ui dialog!

Hi every one, in mvc user control called form.ascx, I have a Telerik Grid contained in a div called "details". from a page called edit.aspx i wrote the following: <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"> <div id="details"> <%Html.RenderPartial("form", Model != null ? Model.CurrentEnt...