Hopefully this isn't too silly of a question. In MVC there appears to be plenty of localization support in the views. Once I get to the controller, however, it becomes murky.
Using meta:resourcekey="blah" is out, same with <%$ Resources:PageTitle.Text%>.
ASP.NET MVC - Localization Helpers -- suggested extensions for the Html hel...
I've searched around and found that when implementing an authentication module in MVC architecture some people opt to place the login related actions in the User controller while others place it in a controller dedicated to authentication only.
In pseudo-java-like code:
class UserController extends Controller {
public login() {
...
Hi, would it be possible to bind a Java application to a Cocoa graphical interface?
I'm working in Eclipse right now, on my mac, and am wondering if Interface Builder could be used to construct a new interface so that I don't have to look at Swing all day.
Any ideas/suggestions? Thanks!
...
Hi all,
I want to get the url for my site as "www.ABCD.com/username" without the controller name in MVC architecture, such that when i click the name of the particular user i want to show details of the user with just the name of the user showing in url.
...
Hi all,
I have a strong j2ee background, and I am trying to move to objective-c for some desktop/iphone programming.
I used many java web frameworks with mvc in mind, spring and struts ecc... so I am used to have servlet or controller which pass attributes to jsp pages, which is the view.
In jsp pages with jstl you can call this attrib...
How to create dynamic views in asp.net mvc 2.0?
...
Hi,
I have this scenario to implement: a collection of parentEntities, each parentEntity having zero to childEntities. I need to implement a multiple-delete form (checked parentEntities will be deleted), with this rule: if a parentEntity has children, it can be deleted only after all its children have been linked to other parentEntitie...
Hi,
I'm using asp.net mvc2 and trying to send a list of json objects with hard coded values from the home controller, and receive them in index....
in the code below i'm sending 1 json object ....
how do i send many?
in home controller:
public ActionResult JsonValue()
{
var result = new
{
...
Hi,
lacking a fellow programmer to talk over the right approach for my problem, I decided to ask you. What is your preferred approach of mapping dictionary tables to a model in MVC paradigm, regardless of the MVC framework / environment you are using?
My problem is I have a couple of database tables that only serve as dictionaries and ...
I have an NSTextField in my view. Its value is bound to an NSNumber *number in my controller. The controller simply calls through to the model (value) to get the appropriate value.
// In the controller
- (NSNumber *)number {
return [NSNumber numberWithFloat:[model value]];
}
- (void)setNumber:(NSNumber *)aNumber {
[model setValu...
Pretend1 there is a place to type in a name:
Name: __________________
When the text box changes, the value is absorbed into the controller, who stores it in data model. Business rules require that a name be entered: if there is no text entered the TextBox should be colored something in the view to indicate baddness; otherwise it ca...
My MVC controllers return 5xx status codes to indicate errors when called using jQuery ajax. This works great on IE8 and Firefox.
However, on my copy of Safari 4.0.5 running on Vista, this breaks. It looks like Safari is translating my 5xx status codes to -504.
Successful ajax calls work fine, and I've already tried uninstalling and r...
i'm facing the problem of the view showing data that's not in the model, and the model containing data that isn't in the view.
Imagine the data model has a birth date field:
DateTime: BirthDate;
And the view lets the user enter a birth date:
Birth Date: 11/28/1973
And that date goes into the model via the controller and all...
I am using ASP.Net MVC but this probably applies to all MVC patterns in general. My problem, for example I have companies and in each company I have a list of contacts. When I have selected a company I can see its details and a list of the contacts for that company. When I want to add a new contact for that company, should the implementa...
If from one view a user enters some invalid data, e.g.:
E-mail: [email protected]
then i want the controller to:
not place the data into the model
color the text box reddish
not allow the user to save
But it's possible that if the user enters the same invalid data in a different view i want the controller to:
place the data ...
I'm using JQuery to switch out an image src thusly:
$("#myImg").attr("src", "../../new.gif");
notice the relative pathing on the new src. Unfortunately, this isn't portable when I deploy my app. In my MVC app I'm using a ResolveUrl() method that will fix the pathing problem for me so it's portable, but now my JQuery image src swapper ...
Greetings,
I have a problem with link in mvc application. When I run it via Visual Studio it's ok. The link then is as follows:
http://localhost:2566/ActivateClient/Activate/6543e2d6-707d-44ae-94eb-a75d27ea0d07
when I run it via IIS7 the link is as follows:
http://localhost/ActivationService/ActivateClient/Activate/6543e2d6-707d-44ae-9...
When a user tries to click:
Save
and they have entered in some invalid data, i want to notify them. This can be with methods such as:
directing their attention to the thing that needs their attention with a balloon hint
automatically dropping down a combo-box
triggering an animation
showing a modal dialog box
etc
What is the...
Here's the easy pseudo-code:
void TextBox1Changed()
{
//If the text isn't a number, color it red
if (!IsValidNumber(TextBox1.Text)
TextBox1.Color = Pink;
else
TextBox1.Color = WindowColor;
}
What's the MVC enterprisey version?
...
I've noticed many sites are able to use a username or page title as an action. How is this done?
For example instead of www.example.com/users/my_username (where the users action is generic and responsible for fetching user data) how could I make this www.example.com/my_username?
Thanks very much.
...