mvc

Marrying jQuery-UI widgets with jQuery templates?

I'm using jQueryUI and jQuery-tmpl, but I believe the advice I'm looking for is broad enough it'd apply to any sort of templating library. The problem I have is that I'll often have some sort of CRUD widget in my template <script id="some-widget-template"> <div class="some-widget"> <input name="NameField"/> <button id="some-widget-sa...

problem with project MVC structure

in my project i have about 20 html forms with many different <input>'s. This <input>'s are unique in every form and they don't repeated between them. For each form there is a script which get data from form, generate specific file, and push it to the browser. and that's it. no databases, admin, logins/passwords and other usual web-app st...

Listing Cities not in Database in CakePHP

I have an application in CakePHP that lists businesses. I have a business model/controller, as well as a state_list model/controller. However I want to be more detailed so when a user clicks on a State page, it lists all the cities in that particular State that businesses are listed in. Then when they click a particular city it then show...

for adding new field to register view

i want to add a new field in register view which is actually a dropdown list box and the data from dropdown must goes to aspnet_user table of membership API. I have already add a new field to the aspnet_user table ....plz help me how can i do that...... ...

JSF files inside WEB-INF directory / Model 2 Pattern

Hi, I want to put my JSF 2.0 xhtml files under WEB-INF\jsf. How do I access them then? I know that anything inside WEB-INF isn't exposed to the outside, so I need a controller to redirect me to the corresponding jsp, right ? (This is also the model 2 pattern iirc). Can I achieve this with a parameter inside web.xml/faces-config.xml? I...

Correct NHibernate Mapping For Stored Procedure?

UPDATE: This is now resolved, see answer below. I am having a bit of trouble trying to work out the correct way to write an NHibernate Mapping File (.hbm.xml) for a MSSQL Stored Procedure. The Stored Procedure accepts two parameters and returns a single row result set containing several columns which have integer values. My mappin...

OpenGL design practices for manipulating quads in 3 dimensions

I'm basically looking to see if I have the design of the following system correct in my mind, since I was handed a prototype as a starting point - but it approached the problem in a separate way than I would. The Application Very simple OpenGL application (will be written in Java) where we will have a window that contains a number of q...

Architectural pattern for ASP .NET and Silverlight UI

Hello, do you know of any available architectural pattern where the most of the code could be shared between Silverlight and ASP .NET UI? I understand that Silverlight won’t work very well with MVC (although people are blogging on how they achieved this in fact what they did wasn’t pure MVC) and same applies to ASP .NET MVVM. However,...

asp mvc: show object details on a jquery dialog

Hi, Suppose I have a list of dinners. This list will present the users with, location, data and some other relevant info. Since that there's a lot of people attending, I want a button on each dinner that opens a jquery dialog that will show the people that will attend. What I accomplish until now: On each dinner on the list I have th...

iPhone app, running other code while flipping a view

In xCode, writing an iPhone app, should I NOT put code after/while flipping a view? I seem to get random crashes.... { FlipsideViewController *controller = [[FlipsideViewController alloc] initWithNibName:@"FlipsideView" bundle:nil]; controller.delegate = self; controller.modalTransitionStyle = UIModalTransitionStyleFlipHor...

MonoTouch - XIB or not to XIB?

I am deciding on where using .xib files are needed while developing with MonoTouch. My current project needs to work with iPhone and iPad, so I'm wondering if even using Interface Builder is worth it. I already have to remove some designer files so that 2 different views (one for each device) go to the same controller. I also am the o...

Should I use many ContentPlaceHolders in ASP.NET MVC?

Recently I made a little site and want to rewrite it using ASP.NET MVC. At the same time I am going make some improvements: insert site map path, hierarchical menu on the side (current article should be selected) etc. Should I use individual ContentPlaceHolder for each such page part or just use one and create such large view model for ...

Proper way to build MVC for my application

I am scraping data from I want to scrape three search engines. In My queries_controller I will have a function search that calls $this->Query->find('$query'). My Model will hand this onto my own Database whose read() funcion will call three functions, searchGoogle($query), searchYahoo($query) and searchBing($query). The return values wil...

ASP.NET MVC redirect dilemma on Application_AuthenticateRequest

I would like my MVC application to check (on every request) if the current user has a profile. If no profile is found, I want to redirect them to the "profile" page for them to submit one. protected void Application_AuthenticateRequest() { if (HttpContext.Current.User != null) { // Redirect to profile...

RESTful URLs with Spring 3

How do I get nice-looking URLs in Spring (without a UrlRewriteFilter)? Does Spring 3 have any convenient way of getting nice-looking URLs (like, annotations, or something)? For example: /springmvc/hello instead of /springmvc/hello_world.html. ...

Selecting most recent news article in a collection with Linq to Sql

I have a bunch of news articles and I want to select the most recent one using Linq to Sql. I have an MVC action method like so [ChildActionOnly] public ActionResult LatestNews() { var article = mhndb.NewsArticles.Single(); return PartialView("LatestNews", article); } I would like to know the syntax for selecting the most rec...

Best way to share a data model and controls between multiple ASP.NET MVC 2 projects

I am building a suite of applications, each its own MVC solution/project, between these applications I want to share the user auth / user util code (profiles, links to the different applications they can access). I am using the entity framework for data access. My question is what is the best way to share this code between the differen...

MVC 2 View Model Data Problem

Here is my database Structure Languages LangID PK LangName nvarchar(100) Category CatID Pk IsActive Bit CategoryText CatID FK CatName nvarchar(200) LangID Int Language LangID | LangName 1 | English 2 | French Category CatID | IsActive 1 | True 2 | True 3 | True CategoryText CatID | CatName | ...

How to add the Html helper extension to this grid?

I need to create and html helper extention which takes boolean and returns string depending on the boolean value public static string ConvertToString(this HtmlHelper helper, bool val) { if (val) { return "Y"; } return "N"; } The problem is how can I intergrate this to the below ...

Access two models in one view in Rails

Background: I'm trying to create a simple feed reader for which I'm using the feedzirra. I am developing in Rails 3. This is probably pretty simple, but I'm trying to figure out how to access the contents of two related models from a single view. The model relationship is as follows: Feed has_many Entries Entry belongs_to Feed Thanks...