Questions tagged [model-view-controller]

1

votes
1

answer
59

Views

Send data to another JavaScript file from a JavaScript file

I want to see the information of this admin in the panel when admin enters the panel. But there are more than one admin on the system. Therefore, I need to find the administrator who logs in to the system according to the mail entered from the login page. When I click submit button, I need to send t...
Engr. Arda
1

votes
0

answer
420

Views

sapui5 QUnit testing - how to use controller functions in my testcontroller

I am really new to the sapui5 language. And currently I'm starting with Qunit testing. My question is, how can I Import functions from other controlls to my test- controlls? e.g. in python there is an 'Import function from module'. this is my test for my configuration.controller this is my _getParen...
Not Me
1

votes
1

answer
1.9k

Views

Cannot find type definition file for 'node' error in angular

I am new in Anguar2. I am working on MVC Core. When I am trying to run my application after debugging, I can view the screen but after few seconds I am getting the following error: 'in E:\Websites2017\MVC\MVC6\Angular2ASPCORE\Angular2ASPCORE\node_modules\angular2-platform-node\node-location.d.ts (1,...
Partha
1

votes
0

answer
104

Views

MVC DropDownList Displays System.web.mvc.SelectListItem

I made a drop down list using @Html.DropDownList() But instead of displaying my list items, it displays System.web.mvc,selectlist item Here's the code: @{ List listItems = new List(); listItems.Add(new SelectListItem { Text = 'Department', Value = 'dep' }); listItems.Add(new SelectListItem { Text =...
Peer Sahab
1

votes
1

answer
1.5k

Views

ErrorException thrown with message "htmlspecialchars() expects parameter 1 to be string, object given Stacktrace: #59

ErrorException thrown with message 'htmlspecialchars() expects parameter 1 to be string, object given (View: G:\xampp\htdocs\Blog\resources\views\songs\index.blade.php)' Stacktrace: #59 ErrorException in G:\xampp\htdocs\Blog\vendor\laravel\framework\src\Illuminate\Support\helpers.php:577 #58 ErrorEx...
Istiyak Amin
1

votes
1

answer
136

Views

MVC Structure in swift

Do we need to create the Web services singleton class file out of the MVC folder, while following MVC Structure or it stays in Model folder together with the Mapper classes
Sushmita Sinha
1

votes
0

answer
19

Views

What exactly could be the reason that my .htaccess file disturbs my script (because of redirecting)?

I am programming a php model-view-controller. Basic structure: mvc | |app | |_ models | |_ views | |_ controllers | |web |_index.php |_css |_js ... As so I use my .htaccess file for redirecting the url: RewriteEngine On RewriteBase /mvc/web/ # Let any content of web be shown (css, fonts, images,...
po0l
1

votes
0

answer
45

Views

How do I properly segregate my View and Model in this specific use case

So I'm working through a MOOC, Stanford's 'Developing iOS 11 Apps with Swift', and in the course the professor highly emphasizes how important it is to separate your View from your Model in the MVC architecture. One of the assignments is a simple implementation of this game: Set. While I did decoupl...
Eric Groom
1

votes
1

answer
46

Views

MVC - Sequence contains no elements

Everything was working fine so far but I have started to get this error. Can you please help me what is wrong with the code. my product model public class Product : EntityBase { public Product() { this.Photos = new List(); this.OrderDetails = new List(); this.Suppliers = new List(); this.Comments =...
livefreeor
1

votes
3

answer
79

Views

How to reference this in closure

I am using PHP Version 7.1.1. In index.php of my MVC I create a route collection ($routes). To it I want to add a route group (with addGroup). This addition process relies on a closure (e.g. an anonymous function), passed as argument to addGroup. Inside of closure I am trying to reference the collec...
1

votes
0

answer
34

Views

ActionListener from controller doesn't trigger

I have an MVC with swing project with two views, a model and a controller. The controller has as fields a list of models, and a list of views. I tried to add a listener on a button from one of my views: private void initializeNewOrderListeners() { NewOrderView view = (NewOrderView) views.get(0); JBu...
user30771
1

votes
1

answer
81

Views

Is shared services right way to implement DRY in angular 2?

I am looking for implementing ERP frontend in angular 2. I have my exisiting implementation in codeigniter HMVC structure.From which I have converted all models/controllers calls in to REST APIS. The older structure was reusing lots of view component for CRUD operations in modules such as CRM, Acco...
jaydeep marvaniya
1

votes
2

answer
242

Views

Git - Error when trying to commit code From Eclipse

I've created a new dynamic web project in eclipse and am trying to connect it to a repository. I follow the steps of creating the git repository for the project and the project gets added to the proper directory I set for the repository. The issue is when I try to commit the files I keep getting an...
mustardtiger10
1

votes
1

answer
190

Views

Best practices to separate business logic from the Controller to the Model layer with Play framework + Scala + Slick

I am a newbie in using Play framework. I am struggling to design a model with one-to-many and retrieve it using Json. I am using Play 2.6, Scala 2.11 with Slick 3.0.0. I have two tables: Rack : case class RackRow(id: String, produced: Float, currentHour: Long) and Gpu: case class Gpu(id: String, rac...
Felipe
1

votes
0

answer
36

Views

Separate Data Mapper on Deeper Level & Single Action Class

I've seen lot of DataMapper example been made like this: namespace DataMapper; class UserMapper { protected $pdo; public function __construct(\PDO $pdo) { $this->pdo = $pdo; } public function getByUserId($user_id) { /* ... */ } public function store(User $user) { /* ... */ } } I was following those...
Rahman
1

votes
0

answer
53

Views

PHP building directory structure image and css errors

Sorry If this is basic but its really holding back my learning of correctly building a directory structure and I just cant figure out how to fix the problem. Consider the following structure: My Problem Whenever I create a file in the directory other than src my images and css paths gets messed up i...
Marilee
1

votes
0

answer
24

Views

Datapicker filter is not working

I am trying to filter by date using a Datapicker.I inserted the input form in the table head and i have an input form only for date. When i click on the form, it appears the calendar to choose a date, but when i click the date it does not show results for that date. I am also using datatables. Thi...
Raina
1

votes
0

answer
34

Views

When Web API is called from same project is working fine. But when I call same API from another project in same machine, it is giving 405 method

First time when I created Web API project(MVC pattern) and I created few API controllers and called from html page(Ajax call),I am able to call all APIs and get the data. But second time I've created two separate solutions one is asp.net Web API and another is MVC Web application. Now I'm running b...
as90
1

votes
0

answer
311

Views

How to solve assertion error status 404 in web mvc test

I have a controller like this ,This seems to be a problem with Spring boot No one has been able to solve this issue , The same issue was raised by another user , check link Error when using @WebMvcTest annotation on a Spring Boot test class @Controller @RequestMapping('/book') public class BookContr...
valik
1

votes
2

answer
193

Views

ruby on rails: undefined method `_path'

I'm getting the error from line #7 of my views when I'm trying to create a new room: undefined method `rooms_path' for # I'm a little confused about why am I getting this error. I have built a relationship between Room and Facility that each Facility has many Rooms. The Facility part works bug free,...
Stella Han
1

votes
1

answer
4.2k

Views

Laravel 5.5 - Passing form's Data to Controller then Passing Data from Controller to the same View

I give up ! 2days i'm looking for solution for my problem. All I need is pass FORM Data to Controller, then just show it on the same View. Easy, right ? But i can not find any solution and Laravel's Manual does not explain that clearly... So this is my View with the form : form.blade.php {{-- Here...
Kamil Lonowski
1

votes
0

answer
101

Views

Show Out Of Stock text in Magento

I need to add on my dropdown list an style into thee out of stock text, im already using this: if (count($productsIndex) == 1) { $stockItem = Mage::getModel('cataloginventory/stock_item') ->loadByProduct($productsIndex[0]); if ($stockItem->getQty() == 0) { $value['text'] .= ' Out Of Stock'; } } $inf...
lucasvm1980
1

votes
1

answer
27

Views

How to model data for similar requests?

I have an issue, I'm not sure how should I model the data from the backend when I have some really similar views on the front, particularly some forms. For example in one of them the user sends an id for a seller and a product code, but in another one the inputs ask for an id seller, a product code,...
Alex D.
0

votes
0

answer
3

Views

PHP MVC: Choose .env or .yaml files for sensitive data in MVC application?

Currenly, in my web MVC application I have a pretty flexible configuration system, with configuration settins defined in .php files (in a config directory). Though, sensitive data (like db credentials, etc) is saved in some .env files, as CONSTANT_NAME= pairs. Technically, these values overwrite any...
dakis
0

votes
0

answer
4

Views

Accept.js POST is causing part of my model to have null properties

I'm using the Accept.js credit card form in their Sandbox environment. I was able to get everything to work yesterday such that when i post and hit our API all of the MVC model properties were filled like i expected. However, today, suddenly there are several properties that are null but some are...
crodgers123
1

votes
0

answer
20

Views

entities() crashes with PrimitiveType != null error

I'm using model first and i don't have any edmmetadata table also got this error when i converted my project to Telerik MVC Assertion failed Expression: primitiveType != null Description: Assertion failed: primitiveType != null it happens here public DigikalaHREntities() : base('name=DigikalaHREnti...
user9306199
1

votes
0

answer
59

Views

Is it possible to manage MVC and HMVC both together in same project of CodeIgniter?

I have already developed MVC project, and i have some more requirement for new module on it, so i want to develop new module in HMVC and i don't want to convert previous MVC to HMVC structure. Is it possible to handle both structure in same project?
Vishal Turi
1

votes
1

answer
43

Views

Submitting a form from one model's controller and view to a different model

I'm new to Rails and working on a sample app. The idea behind the app is that it's a computerized check-in sheet for kids to ride a school bus. There are four models: Family, Kid, SchoolRide, and HomeRide. For Family and Kid, I generated complete scaffolds, but for SchoolRide and HomeRide, they're j...
landmark
1

votes
1

answer
28

Views

Itext Sharp Report is not able to generate the Report For more than 37000 records

I have tried to build the pdf For more than 37000 records but I am getting system out of memory exception and I have also tried after deploying the same in Staging server but getting time out ,I also increased the time out in the Web.config but not able to produce the report.Can Anyone help on this....
PANKAJ TIWARI
1

votes
0

answer
39

Views

How to organise components of a no framework project?

SHORT VERION: Where is the common place to store the controllers for dependencies in PHP? LONG VERSION: I need to create a project at a high quality, coming from a framework background my knowledge on directory structure is a bit rusty and I would like some help. Current Directory Structure: https:/...
bulicud
1

votes
0

answer
227

Views

NLog : writing multiple lines with the same layout all at once

I'm using NLog in a .NET MVC company project with a shared config file containing the mandatory company layout for each line of log. The issue is that I want to create several lines of info logs with the same layout but by calling the info() method once. So far I tried something like this : List li...
Morgoth
1

votes
2

answer
73

Views

delete row permanently from database with delete button(laravel)

i want to delete row permanently from database via delete button. this is my button code in a form that sends id to destroy function. {!! Form::open(array('url' => 'admin/newsmaster/'.$value->id, 'class' => 'form-horizontal create_form', 'files' => true)) !!} Delete this is my destroy function: publ...
debrata
1

votes
1

answer
285

Views

Using a QCombobox delegate item within a QTreeview

I've been trying to utilize Qt's MVC type programming for a particular problem I'm trying to solve. Essentially I want a QTree which has cells populated with a variety of QComboBoxes. I've created my delegate class and the Comboboxes seem to be populated correctly, additionally I'm using a custom s...
Reginald Marr
1

votes
1

answer
592

Views

Proper way to test POST method in Spring MVC Controller

I've got simple app based on SpringMVC and Hibernate, trying to test a POST method which saves a Customer Customer.class to the database. Don't want to test database yet, only simple unit testing. Got the test green, but feel is still not enough, how can I refactor it to make it as it supposed to be...
pinq
1

votes
2

answer
639

Views

Spring MVC home directory 404 Error Intellij Idea

I'm studying Spring MVC, and I stuck almost at the start. I've followed the video about creating first MVC app but it's not working for me. I want to get main.jsp as start page, following the config but the page is not loading, I'm getting 404 all the time. I've create a new Maven project. Then I've...
Johny Placebo
1

votes
0

answer
64

Views

MVC model how to transfer data between multiple views

Hello im trying to create a semi MVC project and im new to this so what ive done so far and what ill explain as my problem here may be completely bad on itself so sorry if that is the case. View 1 tables.phtml View 2 Calc.phtml View 3 Result.phtml Controller Tables.php Model Tables.php On my first...
H. Brendan
1

votes
0

answer
314

Views

Signalr hubconnection.Start not working

I m using SignalR but I have a problem. There is table called Discussion.when data insert, trigger call API service the codes in API service public async void Triger(int ID) { try { var hubConnection = new HubConnection('http://localhost:57278'); IHubProxy stockTickerHubProxy = hubConnection.Crea...
ömer şahin
1

votes
1

answer
573

Views

Set Laravel session lifetime in controller

I know how to change session lifetime and expire_on_close in (config/seasion.php file) but I want to set lifetime and expire_on_close in controller, Because I want to detemine those on demand. I searched in Laravel documentation but I didn't find any useful guide.
Ehsan
1

votes
1

answer
49

Views

multilingual codeeffects rule editor

How can I render the CodeEffects Rule Editor in a different language (Let's say Arabic). I am using a custom class as the source object for the rule model and passing that in the viewbag to the view, there i am rendering the rule editor using that. I have not explictely called any source xml or help...
Usman
1

votes
0

answer
39

Views

How can I delete all the columns in the Dynamic DataTable?

First, I want to delete all the columns and then use the select command to bring all the columns back for perform the refresh operation on the DataTable without refreshing page. So I need a piece of code that I can delete all the columns. I shared my html and javascript code as shown following. Can...
Engr. Arda

View additional questions