So, I'm not quite sure how I should structure this in CakePHP to work correctly in the proper MVC form.
Let's, for argument sake, say I have the following data structure which are related in various ways:
Team
Task
Equipment
This is generally how sites are and is quite easy to structure and make in Cake. For example, I would have th...
I'm using MVC 2 with futures, and I'm trying to hide/show content based on role. Is there a way with ActionFilterAttribute or AuthorizeAttribute if the authentication fails to not show the controller child action all through attributes? Or is all I can do with those attributes is redirect or throw up an error message? I just need the ...
Hi,
i have a form with 2 buttons let say A & B.
The required fields are depending on the button pressed.
Im using actually a DataBinder allowing me to specify requiredFields but for all actions.
How can i customize the required fields that will be depending on the button pressed ?
Thanks in advance
...
I need to call an action inside of a controller from a method inside of a model. This is something I do a lot in other language (when working with the MVC framework), however, I've never seen this done in ruby on rails. The action doesn't render anything, it simply updates a session variable.
...
My goal is to create a thick client to the database. Basically it is all about managing three lists of data.
I would like to slice my application into decoupled layers so using Qt's Model/View framework seems natural to me.
When should I create QSql*Model instances?
I need to be able to connect/disconnect to/from the database severa...
Hi-
What I am trying to do is render a View in an MVC site informing the user to not refresh their browser while server side processing is taking place. This could be a long running task, and if they hit refresh it will send the request again, thus sending them to the error screen when the process was actually successful. I was going t...
My current Routing rules are
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
"Default", // Route name
"{controller}/{action}/{id}", // URL with parameters
new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults
);
routes.MapRoute(
"Admin", // Route name
"Ad...
Hi,
I'm new to OOPHP and frameworks at all.
I'm just wondering...
I have few controllers:
dashboard
signup
login and few more
I've put them into users directory. Everything is working correctly, I'm just wondering if I should put everything in one controller and signup, etc. should be a method of users controller? Or am I doing it co...
Hi,
I have a form which uploads a photo to my database, and I use a view model to aid in this process.
View Model:
public class GalleryViewModel
{
//Members:
public Gallery _photo { get; set; }
public string _title { get; set; }
public string _description { get; set; }
publ...
i want to trim a string in asp.net mvc . i will be doing that in controller where there is a updatemodel implemented or datannotation class or a view? where will be i doing that?
...
How Can I Return or open a view in new window browser from only controller code when some validation a true But Not from Links and button code it should open automatically modelstate if is valid.
Thanks...
...
Please, i need to integrate report (Jasper, JfreeChart, or birt) with an existing web Spring mvc project
...
I am writing Watin test in MVC Asp.net app. I mvc app, all input are wrpped with form and every time an input or textarea is changed their form gets submitted by jquery like code below:
$("textarea", context).change(function() {
$(this).parents('form:first').submit();
});
This is perfect when changes are done by keyboard. How...
I have a form that uses a JQuery Json post. I have 10+ textboxes on the page. I have variables passed the only way I know... is there another way to pass multiple variables?
$('#nameSubmit').click(function() {
var status = document.getElementById('Select2').value;
var lob = document.getElementById('LOB').value;
var lName =...
Im working on a mvc 2.0 application using the entity framework. With the entityframework I use the repository pattern with poco objects. To start off with the issue, when I convert an entity object to json I get a circular reference error.
After some search I discovered that there are proxy's generated to support lazy loading. If there ...
I have just starting learning the MVC pattern today (for gui applications, not web), and have a few questions on where data validation should take place.
From what i have read, it seems like most people are saying that all the validations should take place on the controller, and the model should pretty much only hold the state of the da...
HI we are using spring MVC as our application framework and in one of our modules we need to make an ajax request from one of the jsp's based on the response from the controller we need to redirect to another page.
$.ajax({
type: 'POST',
dataType:'text',
async: false,
url: "${requestContextPath}/home.htm...
Hi, I have a partial view (using MVC2 .net) inside a view which is a form. the partial view has a textbox and is strongly typed.
The problem is I can't get the textbox data from the partial view when I post back, for some reason I can get all the view data inputs on the controller but the partial view, doesn't return the textbox data.
...
Hi folks,
new to cakePHP and trying my first join. I've got one table called users and one called projects. one user can have many projects, so projects has a user_id column.
Here is my action in projects_controller:
function index() {
$this->set('projects', $this->Project->find('all', array('joins' => array(
array(
...
Hello all,
I have follow problem: in my table into View i have more than 50 entries(rows).
I want to show just a 8 entries pro time, and above the table make some kind of navigation (like 1 2 3 4 5 ..) and if i need to see next 8 entries I#m clicking on the number 2, i see them. I dont know how can i do all this. has somebody any idea?
...