Closed vw98075 closed 7 years ago
Can you write a good title?
Thanks !
An output of jhipster info is quite long. I only copy the related portion here
Well you copied only one entity SkuS
and forgot its related entity ProductS
.
For long text fragments, you can always use HTML 5 details
tag.
<details>
<summary>Summary Goes Here</summary>
...this is hidden, collapsable content...
</details>
@gmarziou we should use this in our issue template, have you tried it?
@vw98075 if you use your browser in "dev mode", can you see the network rework? Does clicking on the button produce a request? If yes, you should be able to see it on the backend, with our logging aspect. This is to understand if the issue is on the backend or on the frontend.
@jdubois Yes I used it many times, it has some restrictions though, you cannot have complex markdown in included text but for code or command output it'll be fine using <pre>
tag, maybe not for jhipster info as it returns some ##
headers I think.
@vw98075 I wonder why this happens only to one entity, maybe this is related to your way of naming entities using plural?
I edited the issue using details tag.
@gmarziou we can incorporate the details tag into the output of jhipster info
so that code is wrapped in it. What say?
Sorry but you also posted this on StackOverflow at https://stackoverflow.com/questions/44960062/nothing-happens-after-clicking-the-submit-button
-> I'm closing this as "invalid" as you have answers on SO, and as there should only be one "ticket" or "question"
@deepu105 yes good idea. I can PR it if you want
Just tried in a stackoverflow answer, it does not collapse but it does not look bad either, so jhipster:info can use it safely or we could add a --raw
option or a question.
I think its ok if it doesnt collapse in SO, the primary purpose is for us to work on issues efficiently
OK, I will do it. BTW, maybe we should generate a file rather than printing on console, this would allow us to use a yeoman template
It works with firefox and mobile chrome
@jdubois Sorry for this late reply. It was a bed time here when your folks had a conversation on this problem. To answer your question, I retest it and don't see any traffic on the network panel of the browser. And I was not aware of such guideline which a question only can be posted either here or Stockoverflow. Sorry for that. I first noticed this problem two days ago. I thought the problem must be something I didn't do it right. I try not to bother your folks as possible. I believe that it is a front end problem. The Spring Rest controller method is not hit.
@gmarziou I will rename the entity and replace the "S" at the end with something else. And report back to you later.
A update: After I rename the related entity names from SkuS to SkuSup, the problem still persists. I believe that problem is likely caused by associated relationships. I add all related relationship definitions from an output of "jhipster info".
Overview of the issue
With the generated code, one of my entities can not be saved. On the 8080 port, the form remains the same and nothing shows up on the console after I click the submit button. On the 9000 port, however, a log message shows fetching for related entities from the database after I click the button. There isn't an error message on any console, including the browser's console. The followings is the html file.
HTML template
And the followings is the controller. Note I insert the console.log and nothing is printed on a browser console.
Controller code
(function() { 'use strict'; angular .module('pacificTraderApp') .controller('SkuSDialogController', SkuSDialogController); SkuSDialogController.$inject = ['$timeout', '$scope', '$stateParams', '$uibModalInstance', 'DataUtils', 'entity', 'SkuS', 'ProductS']; function SkuSDialogController ($timeout, $scope, $stateParams, $uibModalInstance, DataUtils, entity, SkuS, ProductS) { var vm = this; vm.skuS = entity; vm.clear = clear; vm.datePickerOpenStatus = {}; vm.openCalendar = openCalendar; vm.byteSize = DataUtils.byteSize; vm.openFile = DataUtils.openFile; vm.save = save; vm.products = ProductS.query(); $timeout(function (){ angular.element('.form-group:eq(1)>input').focus(); }); function clear () { $uibModalInstance.dismiss('cancel'); } function save () { console.log("Saving ..."); vm.isSaving = true; if (vm.skuS.id !== null) { SkuS.update(vm.skuS, onSaveSuccess, onSaveError); } else { SkuS.save(vm.skuS, onSaveSuccess, onSaveError); } } function onSaveSuccess (result) { $scope.$emit('pacificTraderApp:skuSUpdate', result); $uibModalInstance.close(result); vm.isSaving = false; } function onSaveError () { vm.isSaving = false; } vm.datePickerOpenStatus.activeStartDate = false; vm.datePickerOpenStatus.activeEndDate = false; function openCalendar (date) { vm.datePickerOpenStatus[date] = true; } } })();Motivation for or Use Case
Reproduce the error
Related issues
Suggest a Fix
In the controller,
Or in the html file,
JHipster Version(s)
4.5.6
JHipster configuration
An output of
jhipster info
is quite long. I only copy the related portion hereSkuS.json
The
.yo-rc.json
fileEntity configuration(s)
entityName.json
files generated in the.jhipster
directoryThe related SkuS.json is shown above. And the ProductSup is the following:
Browsers and Operating System
Linux Mint 18.2