I have a Rails web application with a select box:
<%= select_tag :foo %>
I'm looking to write a function in the controller which would populate this select box with some values. What code would I need to write in order to do that?
It's fine if the values are hard coded into the function.
def populate
# what goes here?
end
...
Here's a simplification of my real models in ASP.NET MVC, that I think will help focus in on the problem:
Let's say I have these two domain objects:
public class ObjectA
{
public ObjectB ObjectB;
}
public class ObjectB
{
}
I also have a view that will allow me to create a new ObjectA and that includes selecting one ObjectB from ...
hi, i want retrieve LocalResource key and pass to Html.ActionLink linkText.but i dont know.
...
Hi!
I am writing application in PHP (+ MySQL database), but it gonna be mainly AJAX aplication. So, I am wondering, how to create frontend? Frontend also in MVC? Is it possible?
...
Hi,I am building a php/mysql based framework and cms , and I got stucked into passing variables using post method , from a form located in one controller, to another controller. More exactly , i built a form for changing languages. this form is located in localhost/index/index, and when I select a language, it goes to http://localhost/ap...
how are the classses in MFC match the model-view-control pattern ?
the model is suppose to handle the Business Logic , the control suppose to be some kind of mediator and the view suppose to be the gui ?
what class in MFC represent each one ? cause it seems pretty different to me as i read more about mfc. (seems like CView represent th...
I would like to run some logic in my Controller class once all IBOutlets get assigned. What method do I need to override in the Controller class to receive this event?
Thanks,
Rui
...
I am using the TinyMCE control in a MVC page, and now I want to save the content of the control (hopefully with ajax so the page is not rendered again)... I have some javascript that looks like this:
mysave = function() {
var ed = tinyMCE.get('content');
// Do you ajax call here, window.setTimeout fakes ajax call
ed.setPro...
Hey folks
I'm looking for an eCommerce framework with as many of the following features as possible.
Categories, sub-categories and product pages (easy, I know!).
ePDQ/Barclays Payment Gateway Support
User can pick Delivery Time Slots. Think online supermarkets, where you pick a time you're in to receive delivery.
Loyalty Schemes. For...
This line
System.DateTime.Parse("09/12/2009");
convert date (string) to 9/12/2009 12:00:00 AM. How can I get a date in the form 9/12/2009.
after explanations I do:
DateTime dt = System.DateTime.Parse(Request.Form["datepicker"]);
dt.ToString("dd/mm/yyyy");
/* and this code have time, why???*/
...
Background
I'm learning the ropes around how to use ASP.NET MVC properly, and ran into this issue with models:
I have a model that describes a contact I can get that out of the form for creating a new contact, but say when we edit a form, I retrieve it from the repository, show the fields on the contact form and then get the contact ob...
Hi,
I am looking for recommendations on resources (both books and websites) on designing GUI applications. By designing I mean the technical design (when and how to use data binding, when should MVC/MVP be used, what functionality should go into the model, the view, the controller/presenter, how can different parts of the UI best be kep...
In the subject really, I want to know people's experience of trying to keep all WPF concerns out of ViewModels in WPF.
Cheers
AWC
...
I have a window made up of several user controls and was wondering should each user control have it's own ViewModel or should the window as a whole have only one ViewModel?
Cheers
AWC
...
I'm about to use a user control developed by a different team (in the same company) and for the app we're developing we're attempting to describe all the data binding in XAML.
Now if I use a third party user control should I expect them to supply a basic ViewModel with hooks for my code or should I expect to write code to bind the user ...
I am a complete newbie working on my first iPhone project. I have been a .NET developer for 4 years to give you some background on where I am coming from. I am trying to follow the MVC pattern and do things the right way on my first project. I don't want to hack things together just to get them to work.
Here is my situation:
I am trying...
I would just like to know if it is possible to run MONO APS.NET MVC under JBOSS? And if so how can I achieve this?
thx
...
Hi,
I'm doing .NET MVC a lot so I think I understand the MVC design pattern. I'm analyzing my projects according to the Domain Driven Design (Eric Evans) methodology. Anyways..
But in JavaScript it's hard for me to think "MVC" when I'm creating libraries.
Do you have a small example or any experience to share with me on how a small Ja...
I am currently developing a charting application (for the iPhone, although that is largely irrelevant) using their MVC pattern.
One aspect of the application is that you can overlay a number of statistics on the charts. I am a little unsure how I am going to structure these classes.
For each statistic there will be two aspects.
1. Th...
What are the ways to validate form data (in ASP.NET MVC and C#) such as input fields. I try jquery validator but failed. Are there other ways?
...