My experience is mostly limited to PHP, yet as far as I know both Rails and ASP.NET MVC have taken the same path.
The point is that nearly every web framework I've ever come across implements controller actions as methods, e.g. create, edit, show, etc. These methods reside in a single class like PostsController, but they hardly ever sha...
Hi. How can I remove a list of selected items in the QListView in QT 4.6.
Something like this does not work, the iterator becomes invalid:
QModelIndexList indexes = ui.listview_files->selectionModel()->selectedIndexes();
foreach(QModelIndex index, indexes)
{
model->removeRow(index.row());
}
removeRows also not suitable, it...
How can I pass the model in array format.
I want to pass models in this format from controller to view:-
Users[user_contact]=Contact
Users[user_contact][contat_city]=City
Users[user_contact][contact_state]=state
This is what I am doing
public function actionCreate() {
$user = new Users;
$presContact = new Contacts;
$presCi...
How should one go about filtering a series of domain objects according to user-defined criteria? Should the filtering methods be in the model or should they be in the DAO?
...
I'm currently writing a couple of MVC sites using Kohana as my framework. Each has a simple admin area where the admin can upload and edit content. I'm currently storing the admin's user model in a session and checking whether or not they're an administrator with the following method:
private function checkAdmin()
{
if (!isset($_S...
I'm trying to setup Forms Authentication in an asp.net mvc 2 application that will be hosted on IIS 6. There's an issue somewhere in my routing, but I can't pinpoint exactly where it is.
Here is the route entries I'm using to route the mvc requests through the aspx processing on IIS 6. These may or may not be the "right" way, but they d...
Bear with me so I can explain the layout of my problem. I am working on a website/web application that involves customers searching for real estate information. One feature on the website involves the customer performing a search on one page(well call this page A) and the following page(Page B) returns a list of line items that represent...
I'm currently worried that my application design is somehow awkward, so I wanted to ask you how you design your applications.
I'm using C# and WinForms (Don't have the time to get into WPF right now unfortunately)
So I use a ProgramContext so I can have multiple Forms in the same Application and manage them. But the question is, where ...
public string DefString { set; private get; }
private string path = "http://someuri.org/search?Par1=15&Par2=55";
public string GetAnswer()
{
WebRequest myRequest = WebRequest.Create(path);
WebResponse myResponse = myRequest.GetResponse();
StreamReader sr = new StreamReader(myResponse.GetResponse...
Hi Guys,
My question is similar to a crapload out there..
I have a simple app to be hosted internal to my company (accessed on the intranet). its an MVC app with windows integrated authentication.
I have all the code to authorize a user against AD, but how do i implement this in the client (web.config + global.asax etc)
Do i use the...
Hi. I make security system in mvc application. In MVC it must be done by AuthorizeAttribute and roles string via actions methods.
Could i make this stuff: instead of action resolve I want to make view where html parts are hidden depend on current user permission set (For example: save button are not visible if user not Administrator).
...
I'd like to use phpThumb ( http://phpthumb.sourceforge.net/ ) on my view layer to automatically size some images.
What's the recommended way to integrate phpThumb into the CodeIgniter architecture? Has anyone done this already and found that you prefer one method of integration over another?
I'm basically looking for opinions on using ...
I'm tasked with "porting" a few apps from a Windows environment to various mobile platforms and Mac as well.
I plan on writing MVC patterned apps in which I write as many controllers as I can in some sort of universal library, probably in C or C++. Then writing the views in various choice languages (Objective C, Java, .NET, whatever) fo...
Looking into developing new startup with potential of hopefully having high volume.
Initial idea was to straight away have MVC talk to WCF services to create our Application Servers.
However after a little contemplating just wondering what benefits would I gain from using WCF services with MVC application?
If performance became an iss...
Might not be a very consequential question, but...
I have a bunch of mostly-static pages: Contact, About, Terms of Use, and about 7-8 more.
Should each of these have their own controllers, or should I just have one action for each?
Thanks in advance.
...
I'm creating asp.net mvc login page. This is simple. Same as others. Controller contains 2 method.
My problem is
I'm debugging First LogOn method. ReturnUrl has value. for example "Admin/Index". After debuggin Second LogOn method. But ReturnUrl is Null.
public ActionResult LogOn(string ReturnUrl) // First method
{
return View()...
I tried to create a view helper which takes a DateTime object and returns a string. If the DateTime object equals a new DateTime(0), the function returns an empty string. Otherwise return a formatted DateTime string. This works so far.
public static string DateTimeOrEmpty(this HtmlHelper htmlHelper, DateTime dateTime)
{
return date...
i have error in CANCEL button in file uploader.The CANCEL button does't work if i tried to remove(cancel) ADD MORE FILE button.
here is the javascript code:
<script type="text/javascript">
function addFileUploadBox() {
if (!document.getElementById || !document.createElement)
return false;
/*************...
Hello,
Apologies for what might be a simple question; I'm getting back into coding after a seven year absence. Loving it, but everything is taking me so long!
Anyway, I'm trying to upload a file from the browser and then read it into an XmlDocument object on the server. Originally I cracked this by saving the file to disk, reading it...
How to send Json to action, on Struts2?
...