Most voted "controller" questions
A Controller is responsible for controlling the entire flow of information passing through the site/system. It is part of the MVC standard.
Learn more…192 questions
Sort by count of
-
1
votes1
answer137
viewsOne controller method works correctly and another similar returns error
I have two Controller files and two JSP files with the same structure. In JSP I have the following structure for AJAX: $.ajax({ method: "POST", url: '/modulo1/funcao1', data: { 'atributo1':…
-
1
votes0
answers60
viewsString to Date conversion using an html form
I’m having trouble converting String to Date, here are the codes: Event: @Entity(name = "Evento") @Table(name = "evento_table") public class Evento { @Id @GeneratedValue(strategy =…
-
1
votes1
answer338
viewsHow to take a Domain Entity method to higher layers
Hello, I have the following domain entity. public class Cliente{ [Key] public string CPF{get; set;} public string Nome{get; set;} //Outras propriedades public void Sacar(Conta conta, decimal valor){…
-
1
votes2
answers112
viewsHow to pass post variables, save them until the last step and show all values
I have a form that is divided into 10 parts, IE, I will save via post the variables from page to page. However, if you refresh on the page all previous variables are lost. How can I solve the…
-
1
votes1
answer51
viewsError between Directive and controller
Archives: index.html controllers/control.js Directives/directive.js Directives/boot.html *i have a function called $Scope.change(age) = Function(){.... }; in the control.js *in the directive I have…
-
1
votes1
answer62
viewsWeb API Controller Standardization
I would like to know the following. Imagine the following URI: (1) api/orders (2) api/orders/10 (3) api/orders/10/items URI (1) and (2) I am sure they would be within a class called…
-
1
votes2
answers612
viewsHow to make unique record query
I have a JSP that on the same screen I register for consultation. When opening the screen I have basically the fields for the registration below a grid with the list of the bank, so far so good,…
-
1
votes1
answer329
viewsAngularjs controller does not work well
I am giving a basic study on how to create screens using Angularjs and Material, everything going well until I need the controller, it seems that $Scope is not working, I put a console.log at the…
-
1
votes1
answer51
viewsLaravel - I make a @list action for each Controller or a 'listController' Controller receiving parameters?
I have an administrative panel with several areas your item listings from each own table. What’s best to do: A action 'list' for each Controller responsible for each area: class aController extends…
-
1
votes1
answer497
viewsCommunication between MVC Controllers
I’m having trouble making a communication between Controllers each in a Area different, the public methods of the second controller are not available in the first. Is there any way to do this?…
-
1
votes3
answers2378
viewsSend a List<T> with multiple items to the controller
Well, I’m facing the following problem in a project I’m working on: how to pass a list (List) with approx. 500~1000 View lines for the Controller? Actually, this list of mine has a field called…
-
1
votes2
answers2457
viewsHow to use the controller in a java application
Staff I am starting in programming and would like to take a question that does not want to shut up, how to use the controller correctly whether it is being used in a design Pattern model or even in…
-
1
votes1
answer54
viewsCalling Controller method and get the function print
When I call the Controller Method to list users, instead of returning me the array it returns me the print of the function Controller code: export default userController = { Listar: () => {…
-
1
votes1
answer152
viewsButton with link on MVC5 is not working
I created a popup in a project mvc5 (Razor) and it is not working the link that when clicked on the button would go to another page but is not working I will post the code here below. Code : <div…
-
1
votes1
answer664
viewsHow to extend Ci_controller to more than one core?
In Codeigniter you can create a file in the application/core folder MY_Controller.php and the controller extending this file, a basic example would be: <?php class MY_Controller extends…
-
1
votes2
answers996
viewsMetodo Json - Return
I am developing a return of Zip Code through the post office API, the part that is in the controller is working, but I do not know if the return is correct, nor how to use in the view. If anyone can…
-
1
votes1
answer286
viewsRetrieve the value of a dynamically generated field
Good morning. Staff would like to know how do I recover the value of the control that is generated dynamically in my form at runtime? Type below in the image I have a class that brings all the…
-
1
votes1
answer77
viewsProcessing 3.2.1, Game Control Plus library, java Exception
Good! I am studying Games & Apps Development and in our first semester we are doing a game in Processing. In my game I’m using a PS4 controller with the help of the library Game Control Plus. If…
-
1
votes2
answers113
viewsHow to limit the amount of addresses a user may have in the database
I have a database, and I have the user table and the address table. I need to validate somehow so that a user can have at most 5 addresses in the registry. I use the Postgresql database and it is an…
-
1
votes1
answer118
viewsHow to recover php parameters passed by the $http({ ... data: ...?
I have my controller that requests login: app.factory('LoginService', function($http, $location, SessionService) { return { login: function(data, scope) { $http({ method: 'GET', url:…
-
1
votes1
answer265
viewsPass ID to Controller
I have the problem that when I click on the Register button, the City does not pass the ID. I did. The ID is being passed to the screen, but when passing to the controller is not. <div…
-
1
votes2
answers584
viewsAngular with ngRouter does not work when I type in Browse
I need to type in the Browse... dominio.com.br/details/1234 ...and I need the controller to take this 1234 number and perform your task. I tried everything unsuccessfully. NOTE: If I create an…
-
1
votes1
answer404
viewsThe import org.springframework.web.bind.Annotation.Crossorigin cannot be resolved
I’m not managing to import the Annotation @CrossOrigin. ide does not find the necessary package despite all the others Annotations are working normally. The error that occurs is this: The import…
-
1
votes1
answer352
viewsHow to pass parameter to Index from another Controller
I have to pass a parameter (ID) to a controller’s index, I tried to use the ActionLink but it didn’t work. View: <body> <table class="table"> <tr> <th>…
-
1
votes1
answer449
viewsHow does the communication between classes work from client/user requests in MVC?
Good afternoon, I am creating my MVC framework to better understand how this structure works and what may or may not be done within it. His structure is mounted like this: From what I understand so…
-
1
votes1
answer614
viewsCodeigniter Administrative Area Controller
I am developing a website with administrative area. I started it with the new version of Codeigniter 3.1.5. In the main pages would be body of the site, already in the news pages the url would be as…
-
1
votes1
answer507
viewsPass date by Ruby on Rails parameter
I’m trying to pass a date clicked as a parameter in order to load another view and I can’t. The idea is to list all bookings made on the selected day. Controller class ReservasController <…
-
1
votes0
answers937
viewsSuccess : Function ajax call another javascript function
function paginacao_tabela_clientes_status(idpessoa){ $.ajax ({ type: 'POST', dataType: 'json', url: BASE_URL + '/clients/tabela_clientes_pedido_entregue', data: {idpessoa: idpessoa}, success:…
-
1
votes0
answers296
viewsRequest Variable returning null
Good afternoon guys, I’m new to frameworks but I have the following little problem: the request ta returning empty for my query thanks in advance "select * from `usuarios` where `cep` = ?" my…
-
1
votes1
answer1242
viewsForm validation - Angularjs
I am trying to validate a simple form, where when the user leaves some field blank a div is damaged with this error. Follow the code var playlistApp = angular.module('playlistApp', []);…
-
1
votes1
answer737
viewsSave various data in Laravel
I have the following formula in my Blade, and now I want to save the data of each row in my database. How to save this data in Laravel? for ($i = 0; $i < 12; $i++){ var minhaData =…
-
1
votes0
answers38
viewsbad request when sending number to Spring controller
I have a form that sends some data to a controller, when I send only text data works, but when I send a given type number ( and that in the controller I hope to receive as parameter a Double) gives…
-
1
votes1
answer140
viewshttppostedfilebase always empty when passing csv to controller
Boa Tarde Personal, I’m having trouble passing a csv that is being sent from ajax using jquery to the controller where null always arrives. Could you help me? View : @using…
-
1
votes1
answer96
viewsProcedures after errors should stay in the services/validations or in the controller?
In a backend that has separate validation functions to check the validity of the data, if this data is invalid the procedure (return a 400 or print something on the screen, for example) must occur…
-
1
votes0
answers51
viewsmvc HTTP 404 error
Good, I created an ASP:NET WEB Core 2.0 Appl project. I created views and controllers. When I do a Ubmit via: <form asp-controller="Audit" asp-action="Search" method="post"> Instead of opening…
-
1
votes1
answer37
viewsQuery returns another user’s value
I am not able to compare the code (from the logged in professional) with the hired code (which should be the same as the logged professional) in sql query and this makes the query return a value of…
-
1
votes1
answer76
viewsAdd inside a new position array in javascript
var produtos = new Array(); produtos = [{"Id":2,"Nome":"X bacon","Valor":12,"Quantidade":1},{"Id":3,"Nome":"Lucas","Valor":9.97,"Quantidade":1},{"Id":4,"Nome":"teste","Valor":5,"Quantidade":1}] I am…
-
1
votes1
answer404
viewsWhat function and how to use Controllers in Laravel
I’m learning Laravel by a channel, and left me doubt... How should I create my Controllers? As far as I understand it, the view asks for it, the controller will validate and successfully calls the…
-
1
votes1
answer49
viewsDoubt about the Controller in spring mvc
Hello. I am studying the spring mvc and I am a few questions about its functioning. One of them is on the part of the controller. When I fill out a form and request a controller method, are all the…
-
1
votes1
answer101
viewsMVC and JAVA doubt
Giving continuity to a project of the college that was stopped, I intend to do it in Java already I did and I remade from scratch about 2 times however, it was horrible and to each class I realized…
-
1
votes1
answer3143
viewsWhat to do to call a function from another controller in Laravel? I would like to implement best practice
I have a boletosController controller need to call the Function create in the tradeController; boletosController.php; namespace App\Http\Controllers; use App\Repositorios\Boletos; use…
-
1
votes0
answers32
viewsAjax return error when sending Formdata with file to MVC Controller
I have a problem that started to occur for a while. I have a view that sends a FormData with attachment information (input type file) to a MVC controller via an Ajax. The controller returns a Json…
-
1
votes1
answer61
viewsIs it possible to have more than one "post" route in a controller. NET?
I’m starting a C#. NET Core API project. When I create a controller like "API Controller with read/write actions" it creates the available actions. using System; using System.Collections.Generic;…
-
0
votes1
answer195
viewsForm being rendered with wrong action attribute
I am using spring form tags to render the forms present in my views, but I am facing problems because they are being generated with the wrong action attribute. In my controller, I have the method:…
-
0
votes1
answer281
viewsHow to pick up an Array on all view pages
I have a view that’s called by a master page, the problem is that step one array and the second page called, but the data does not arrive as expected. ex. //controller index class Index{ public…
-
0
votes1
answer146
viewsInclude a fxml via code by a controller
Hello, I have the following question. I have two fxml: Userlist.fxml and Userproperties.fxml. And I need to include Userlist within Userproperties, but it can’t be by fxml, because it won’t always…
-
0
votes0
answers214
viewsHelp with Where in Laravel
Hi, guys wanted a little help from you on a Where. In my system is like this, I am in the Development photo gallery page( id=1 ), on this page I can register the photos of the month/year of the…
-
0
votes1
answer116
viewsHow to display a user’s Posts?
I’m trying to display user posts on perfil = link_to 'perfil', user_path(user) User data appears, but when I try to show user posts comes error: Nomethoderror in Userscontroller#show Undefined…
-
0
votes2
answers496
viewsForm to change variable for a calculation in the same view
I’m starting with the Rails. I have a view that receives information from the database and by means of a model methods do several calculations. For example: <% @profundidade = 0.5 %> <%…
-
0
votes1
answer42
viewscontroller name with hyphen in cakephp 2x url
I’m working Google SEO on my site, and I realized, in word separations, a hyphen is better than an underline, or words together, only I realized that at first cakephp doesn’t accept creating…