mvc

how to check the state of the row in jqGrid

i whant to check if the row is in edit mode. i've checked the jqGrid documentation but i couldn't find this. thanks in advance ...

MVC - Multiple Model One Data

For example, in an IDE application, say for C#, there are 2 views ClassView and TextView. In ClassView we need to display the Class information in a hierarchical manner, where as in TextView the code for that Class is shown. The ClassView needs to query for classes, methods, properties, fields, etc. whereas the Text View queries lines ...

Parse then Store XML Data from API in Ruby on Rails

Hello All, I know there have been a ton of entries about this topic but I haven't seen the complete picture yet of how to store the data. I am trying to make a system that reads then parses then stores information about events from the Yahoo Upcoming API. The url returns a pretty simple xml that looks like this <event> <id>489875230<...

Two Model Classes - One Database Table

Do you ever do this? I'm writing a Rails app. I have a situation where I have a Task model (and table), the Task has attributes, people that are allowed to view it, and a hierarchy (it may be under a project, or a business). I also have an AssignmentController that exposes some views and functionality to the individual that's assigned...

Rails - embedded polymorphic comment list + add comment form - example?

Hey, all. Working on my first Rails app. I've searched all around - read a bunch of tutorials, articles, and forum posts, watched some screencasts, and I've found a few examples that come close to what I'm trying to do (notably http://railscasts.com/episodes/154-polymorphic-association and ep 196 about nested model forms), but not exac...

Set included PHP and HTML content to a variable

I am working on a small MVC "framework", which will simply provide a more organized workspace for me, as I've found I love CakePHP but only for it's organization. Now, I'm trying to replicate the layouts (which contain <?php echo $title_for_layout; ?> and <?php echo $content_for_layout; ?>,) and I'm curious how I would be able to load a ...

Flash is not displayed in IE8 (in ASP.NET MVC application )

Here is my code in Site.master <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="980" height="337" id="flashheader" align="middle"> <param name="allowScriptAccess" value="sameDo...

MVC in Groovy/Grails

Hi, I'm newbie to groovy. How can we call domain methods from controller in Grails. Controller : def results = User.fetch_results User Domain : def fetch_results { def users = this.get(1) } Sorry if the above code is wrong, i need to know how to access domain methods from controller. thanks. ...

swing: best way to make components enabled/disabled depending on the state of a model

I have a data model model which has a boolean flag connected, and I have a view with several components that I want to enable if model.isConnected() is true and disable if it is not. What is the best way to implement this? ...

Best way to transfer an Entity Framework object over the web and back via JSON

I've got some MVC code that serializes an EF 3.5 object into an anonymous type for return as a JSON result to an AJAX call on my page. The hurdle I have is that when I send the object back to the server via JSON, (and let the ModelBinder deserialize it for me into my EF type), I have to update it in my Entity Framework context manually....

imagepng - creating in /public folder

How can I specify filepath to imagepng function? It always seems to create the file in "/public" folder when used in an MVC Zend Framework and even when an explicit filepath is supplied. Is it because of the rewrite rules I have? My .htaccess rewrite rules are as under: FileETag none <IfModule mod_expires.c> ExpiresActive On ExpiresDefa...

ASP.NET MVC HandleError and Order of Operations with other Attributes

Hi guys, I'm trying to get the HandleError attribute to work, but I'm having some difficulty because of a sort of a special circumstance. I have another attribute which checks against a blacklist of IPs in my database and quite literally throws an exception. I was hoping to catch that exception with the HandleError attribute and route ...

ASP.NET MVC ViewModel and DropDownList

I have 2 properties in my ViewModel class ViewModel1 { Dictonary<int, string> PossibleValues {get;set;}//key/value int SelectedKey {get;set} } I want to edit this using a Html.DropDownListFor I want to get MVC to auto serialize the data into/from the ViewModel so I can the following public ActionResult Edit(ViewModel1 model)...

CakePHP 1.3 (newest), fatal error while baking views

I've just downloaded the newest beta of CakePHP 1.3 for a new project (not a serious one, so no worries with the beta, still learning stuff, I'm right now trying to get grip on acl/auth). I've baked model and controllers for four databases, but baking a view results in a fatal error: Fatal error: Call to a member function on a non-obje...

Problem with ASP.NET MVC DropDownList not displaying selected value

I have an aspx page which allows me to edit articles. Among things I can edit is which category the article belongs to. The category is chosen through a DropDownList as shown here, <%= Html.DropDownList("categoryID", (IEnumerable<SelectListItem>)ViewData["CategoryID"], new { @class = "textbox" }) %> However, the articles category isn'...

Is JAX-RS suitable as a MVC framework?

JAX-RS has some MVC support, but I wonder if JAX-RS is really a good choice to build web application for human use. If a user enters wrong or incomplete information in a form, it should be displayed again like with Grails or Wicket. Is there a comfortable way to do this with JAX-RS? As far as I know the URI mapping doesn't work correct...

IIS 7 and ASP.Net MVC issue

Hi - This is a bit complex - so here we go. I am developing a mobile web application using asp.net mvc and I need to test it locally on my iPhone. So far I have the first iteritaion of the site running on my local dev laptop. I created a virtual dir for the site under IIS 7 on the same machine. I deployed the site to that folder from V...

How can I create a login partial view in MVC?

How can I create a login partial view in MVC 2.0? I want to include this in several masterpages in my site since I can't use the login control in MVC. What code do I put in the controller which will accept the username and password? ...

How to specify a 10.5 font size when using FontFactory mvc

This works: Font font_medium = FontFactory.GetFont(FontFactory.HELVETICA, 10); and this does not build: Font font_medium = FontFactory.GetFont(FontFactory.HELVETICA, 10.5); I get the build error: *> Error 3 The best overloaded method match for 'iTextSharp.text.FontFactory.GetFont(string, string)' has some invalid argume...

Creating a more flexible view in Zend Framework

Given an html/javascript 'widget' which needs to have certain fields customized before use. For example, the css class ids need to be unique as the widget may appear more than once on the same page. Let's say I want to keep the markup (js/html) of the widget stored as a template so that I can fill in the values that need to be customiz...