Hi there,
I woud like to implement some editing mechanism for an iPhone application, that is I want the user to be able to edit an instance of my model. The model contains two types of data: The first is just an NSString where the user can write virtually anything he likes. The second one is a selection where he is able to pick one from...
Hey guys, I've got a model that has an id that isn't unique. Each model also has a date. I would like to return all results but only the most recent of each row that shares ids. The model looks something like this:
class MyModel(models.Model):
my_id = models.PositiveIntegerField()
date = models.DateTimeField()
title = model...
I'm writing an MVC2 app using DataAnnotations. I have a following Model:
public class FooModel
{
[ScaffoldColumn("false")]
public long FooId { get; set; }
[UIHint("BarTemplate")]
public DateTime? Bar { get; set;}
}
I want to create a custom display template for Bar. I have created following template:
<%@ Control Lan...
Hi,
I have been reading MSDN articles about COM Threading Model. In one of those (http://msdn.microsoft.com/en-us/library/ms687205%28VS.85%29.aspx), I came across following line: "Like other servers, in-process servers can be single-threaded, apartment-threaded, or free-threaded.".
I am confused about what (COM Client thread and COM S...
For a custom TableModel, I am overriding isCellEditable, which is returning true always.
I am also overriding setValueAt, but don't know how to use the method, so that, JTable reflects the changes done by editing.
Below is the modified code for PersonTableModel :-
class PersonTableModel extends AbstractTableModel{
public int getR...
Is it even possible to do something like this in codeigniter?Is it considered a good practice in general?
...
I am creating a site much like a wordpress blog whereby the front page will display a post loop: with the post_summary, author info, and tags.
I have four tables:
posts | users | tags | tag relationships
to display all the results i would need to do multiple JOINs for in the SELECT statement
However, to stay with the MVC pattern, th...
For example I have a joined-subclass namely Foo and wanna subclass Foo?
I don't know even it's valid or not?
...
Hello.
I write web-GUI for application and must (!) using names for columns such as 'delete' or 'listen-control' and so on.
I find this code but it is dated by 05 Aug 2005 and not works with Rails 3.
How can I redefine this names using native Rails mechanism? Is it possible?
PS I'm know about problem with hyphens in the Rails.
PPS ...
I am creating this MVC model and trying to understand best way to do it.How should I get related data when I have relationships between tables.For example in code below I have created a formviewmodel and I am calling function to get all images in Images table for a user. Should I instead keep images property of Users model and fill that ...
I have been having a problem when I try to compare two Rails models. They should evaluate as the same, but the way ActiveRecord implements == is causing it to fail. What's even stranger is the unit tests are passing.
Suppose a User has many Posts, and Posts has many Comments. User also has_many comments.
(and this is comparing two obje...
Hi.
I've been silly.
I have a model called Emails, which I have build alot of functionality for, however now I have come to actually send emails in the emails controller and have hit a wall.
The email component clashes with the model, they are both referenced with $this->Email.
My question is how can I rename the component (going bac...
So, my question is that I have a model. My model has some data that is populated based on the id passed in through the url and set into a cookie, and the rest is user input, which is validated using data annotations.
The "problem" I've come across is how to handle this non user input data. Do I put it in hidden controls and thus infla...
I currently have below lines for application_controller.rb. Basically, I am using session to check whether user has logged in or not, including authentication. I just used a term m
class ApplicationController < ActionController::Base
protect_from_forgery
protected
# Returns the currently logged in member or nil if there isn't on...
Hi,
I am trying to manke an Adminhtml Grid which joins a table that I made called "facility" to "customer_entity" and all of its attribtues.
I'm noticing that since my table is flat, and the model inherits fomr Mage_Core_Model_Mysql4_Collection_Abstract, I'm not able to use all the class_methods that I've seen as examples on the back...
Hi
I have the application which is developed in asp.net mvc 2. I am trying to deploy it on Windows XP machine which having IIS 5.1 . It is deployed fine after I add the extension to web application node in IIS . I added .* by selecting the aspnet_isapi.dll from frameworks path. I know this is not problem of IIS . It is problem of I think...
So I've just been experimenting with ASP.NET MVC and I'm really starting to like the way everything has one single purpose (as far as the separation of purpose between the models, views and controllers) but I'm still having some trouble applying my basic knowledge to a somewhat practical purpose.
So, I was thinking of trying to create a...
Hi,
Is it possible to filter a named query in a reporting services data source view on the global user ID?
I would like to do something like select UserName, ContactNumber, Email from Users WHERE (Users.UserName = User!UserID) so that it returns the name and contact details of the user running the report.
Any help would be much apprec...
I have a main Contact and ContactViewModel . How do I get contact model and update it to the database ?
[HttpPost]
public ActionResult EditContact(ContactFormViewModel contactView) {
}
I was doing like this before I needed ViewModel
[HttpPost]
public ActionResult EditContact(int id, FormCollection collection) {
...
I have a complex Model
public class ComplexModel
{
public UserModel userModel;
public ExtraInfoModel extraModel;
}
where
UserModel may have required fields
as in:
public class UserModel
{
[Required]
public string email;
}
how do I validate ComplexModel to make sure that the data annotations on its member mode...