Cannot read property 'preventDefault' of undefined after upgrade - jhipster

I just upgraded an existing project to the latest version of jhipster. When logging in I get a Javascript error message: Cannot read property 'preventDefault' of undefined. I can see that in the login.controller.js a new line is added event.preventDefault(); (the problem is caused by this line) is added, which wasn't there in the previous version. I don't know where to look for a solution (my Angular knowledge is very limited). Can anyone give me a hint of where to look? Thanks!

The problem is not in login.controller.js, it's in account/login/login.html. Maybe you have customized this view template and did not update it. It should include this form definition:
<form class="form" role="form" ng-submit="login($event)">

Related

How to avoid duplication documentation with angular

I'm writing a documentation with angular.
For now, i duplicate twice the code. Once in the button.component.html to make the componenbt appear, and the other is injected from the button.component.ts as a string so it's not interpreted.
The goal is to show the result you will get if you tips the code contain in pre balise.
I need to avoid these duplication cause when a component change, i need to modify twice the code.
I first have use to simulate include comportement but it's not working as the final content is the generated content and not the original content.
Then i checked how angular material perform for their documentation, and it's same to be a bit tricky and complicated for me has they inject their component as dependancies.
I'm asking if there is a sample way to avoid this duplication content and if someone have faced the same issue.
I have only one idea, it's to run a shell commande in the end of ng build with webpack and node, and get the content of the target block and inject directely in the target balise.
Sample :
<div class="my-5" data-source="myButton">
<button mat-button>
<mat-icon class="icon-left">help</mat-icon>
Support center
</button>
</div>
<code data-target="myButton"></code>
But i'm not very sur about that solution.
Thanks in advance.
Kevin
For people who have face the same problem, there is the module you have to use :
exemplify-angular
It's do the job perfectly.
Kevin

No tag "notifyMessage" defined in tag library imported with prefix "rich"

I'm busy getting this red-line when trying to use <rich:notifyMessage>. I'm used to primefaces but for this project richfaces is inevitable, hence i'm quite a novice here. I'm using richfaces 3.3.4 final and all required jars are included. What could I be missing? Is there a perfect alternative for a notification message pop-up apart from <rich:message> or <rich:messages>? I'd really appreciate a working example too. Thanks in advance.

How to center an image in NPM README?

Problem
I have a project fully documented and with a README which has the logo centered:
https://github.com/Fl4m3Ph03n1x/fs-error-logger/blob/master/README.md
The code I am using for this is the following:
<p align="center">
<img src="./logos/logo_no_wm.png" >
</p>
After reading NPMs documentation, I had the strong impression this same code should work on NPM's markdown:
https://github.com/npm/marky-markdown/pull/242
However, if you check my NPM project, you can see the logo is not centered:
https://www.npmjs.com/package/fs-error-logger
Question
How do I fix this?
This could be a bug or an intentional decision by the developers. I suggest filing a bug report.
A view of the page's source code reveals the following HTML for that image:
<img src="https://raw.githubusercontent.com/Fl4m3Ph03n1x/fs-error-logger/HEAD/logos/logo_no_wm.png" />
<p></p>
There are a couple things to note there. First, the image is not wrapped in a p tag, which is weird. Second, there is an empty p element immediately following. This could be a bug in their system, or an artifact of their HTML sanitation.
According to an HTML comment in the HTML source, marky-markdown is the markdown parser used. That project's documentation states in part:
What it does
Parses markdown with markdown-it, a fast and commonmark-compliant parser.
Removes broken and malicious user input with sanitize-html
It then continues with a bunch of other post-processing steps. I checked and markdown-it passes the raw HTML through just fine, so presumably one of the post-processors is altering the output in some way. Or possibly, marky-markdown's modification of the markdown-it parser has broken something.
What I don't know is if this was an intentional decision by the marky-markdown developers or a bug. If it was intentional, then you may not ever be able to get your desired behavior. Either way, filing a bug report is the best way to get any answer.
EDIT
For future reference, and for anyone else encountering this problem, the bug report is here. The response is that this is in fact a bug and a fix is already pending.

xpages tag cloud: links are missing

I'm tryng to use the tag cloud control from Ext.Library 9.0.1 (20160428). The cloud is generated with the correct values form the category view but all the links are missing.
I suspect I'm missing something stupid and my question will look a little bit silly but... I've already lost some hours on this without getting any result.
This is the code for the tagcloud:
<xe:tagCloud id="tagCloud1" sliderVisible="true">
<xe:this.cloudData>
<xe:dominoViewCloudData categoryColumn="0" viewName="indice"LinkTargetPage="/risultati.xsp" linkRequestParam="nometag">
</xe:dominoViewCloudData>
</xe:this.cloudData>
</xe:tagCloud>
This is what I get in a browser (just an example, all the lines look similar):
<li style="display:inline">
<a role="link" title="11 Entries" class="tagCloudSize9">Miscellaneous</a>
</li>
As you can see there is no link to anything, so the user can't click the cloud label.
Any advice will be appreciated
Thanks in advance
It seems it was only a cache-related trouble. I've restarted my server and it started to work as expected.
Just wondering why and how to avoid in the future...

LifeRay form validation using Alloy UI

I use LifeRay 6.1.2. And it have built-in Alloy UI 1.5. framework. So I try to reproduce this form validation example (I copied all code), but it don't work as expected (error labels in DOM, but they are don't visible in form (see EDIT1)):
Expected result is (you can try yourself live example using link provided above):
Where is problem? How to solve it? Thanks.
EDIT1:
After some research, I realized that if I delete aui-form-validator-message CSS class from error message's DIV tag (it generated by LifeRay, I'm not adding it), then error message become visible. Strange..
You should post your own code, or it's difficult to answer.
Anyway if you want you could try the aui validator tag for example:
<aui:input name="name" value="${name}" label="name">
<aui:validator name="required" errorMessage="your-message-here"></aui:validator>
</aui:input>
learn more # http://drewblessing.com/blog/-/blogs/34509
Hope it helps!
I think you have not used the tag in your code.
<script src="http://cdn.alloyui.com/2.0.0/aui/aui-min.js"></script>
Paste this and check.

Resources