How and why is p:inputMask submitting slotChar as value? - jsf

I have a web application using Primefaces 5.2, running on GlassFish 4.1, that has some elements p:inputMask like this example:
<p:inputMask slotChar="_" mask="9" required="true" />
In the server side, I realized that sometimes the submitted value is "_" (without quotes).
I tried to reproduce the problem, but I didn't understand how this happens.
I tried leaving the field blank, copy-paste, pressing enter... I searched in internet, but only found this problem on older versions of PrimeFaces.
I can't talk with users. I just know the last one who caused this error was using Google Chrome.
Does anyone have any clue about how to reproduce the problem? I need to understand this, so I can solve the problem.
Thanks.

Related

PrimeFaces Extensions CKEditor: attempts to set encoding to UTF-8 unsuccessful

Why I am using this editor:
In the past I used PrimeFaces p:editor which is however deprecated and lacks functions that the users desperately want. I cannot use the new PrimeFaces p:textEditor because of this: Primefaces textEditor: converting text to HTML with JavaScript not working.
What is it used for:
I am using pe:ckEditor from PrimeFaces Extensions in my program, in which the editor is used by the user to create an e-mail message content. Then by click on a send button, the HTML from the editor is taken and sent via e-mail to a client.
What is the issue:
When using p:editor, I got the HTML by JavaScript function saveHTML and it worked perfectly even when the text contained Czech characters (ěščřžýáíéó), I did not even have to set enconding or anything else and it worked.
Now however when user writes "V případě dalších dotazů se na nás můžete obracet každý den na telefonním čísle", the gotten HTML has the text like this:"V pÅípadÄ dalších dotazů se na nás můžete obracet každý den na telefonním Äísle" - complete rubbish that the user obviously cannot send to a client...
My research:
EDIT: Based on some comments, I tried to add the <meta charset="utf-8> and <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> but that did not help. In pom.xml I have found also this <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>, so I do not think that there is a problem in the HTML page, but in settings of the editor itself...
So I figured, that the encoding must be set especially for the editor in its config. I finally figured how to make the editor access the custom config, but nothing that I found on the Internet and added to the config worked for me:
config.language='cs';
And:
config.entities_latin = false;
And:
config.entities = false;
And:
config.basicEntities = false;
And all its combinations.
ANOTHER EDIT:
Based on some other comments here, I also installed OmniFaces and tried to solve this by CharacterEncodingFilter, but nothing changed and it is still not working.
I also found out that my problem seems to be very related to this issue: Unicode input retrieved via PrimeFaces input components become corrupted, but the accepted answer there gives 3 ways how to solve it, one is the CharacterEncodingFilter, other way is not applicable for Tomcat users (me) and the last "solution" seems to be reporting this to PrimeFaces Extensions developers (which I did: https://github.com/primefaces-extensions/primefaces-extensions.github.com/issues/756 ).
Please let me know if you know how to fix this or if there is any workaround.
PrimeFaces Extensions - version 7.0.2;
PrimeFaces - version 7.0.7
I and my colleague found out what the issue was based on the test code that #melloware provided.
The original editor p:editor, which we had been using and which we are trying to replace by pe:ckEditor, could provide us with its content in HTML only in case we used JavaScript function saveHTML.
But with pe:ckEditor, anytime the user hit the Send button, whose onstart contained the saveHTML, the saveHTML corrupted the content. Once we erased the saveHTML and took the pe:ckEditor content as it was (which is already in HTML), it was fine without corrupted characters.

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.

I don't get any PropertyNotFoundExceptions although I should

The title almost says it all. In expression language .. expressions I can put any arbitrary property names on beans, still I just get no errors or exceptions on the server console. For example:
<h:selectBooleanCheckbox id="stuff" value="#{bean.stuffEnabled}"
disabled="#{bean.iGuaranteeYouThisPropertyDoesntExistadfasdfokui}" />
I'm just getting nothing. No Error. This really sucks for debugging. I tried googling if there is a setting to disable this somewhere but didn't find anything helpful. Actually, most results I got where concerned with the opposite, getting rid of the PropertyNotFoundException ;)
FYI: this is Mojarra v2.1.19-redhat-1 on JBoss EAP 6.1.0.GA (AS 7.2.0.Final-redhat-8)
Thanks for any help or pointers in the right direction

Disappearing form fields on IE?

I have been working on this site for some time and just launched it for a client.
People have actually had trouble beleiving I had done it on WordPress, though I don't see why...
Anyway, I suddenly see that the form fields of one of the forms on the site (Newsletter Registration) disappear while on IE, you get to see them for a second and puff, they're gone. I did check this previously on IE and it worked, I especially used CSS3 PIE to get the rounded effect for the fields on IE...
Link to website: http://www.doritsivan.com (hope this isn't considered promotion, not my intention)
site is based on WordPress and jQuery.
resolved the issue, thank you all. it was a bad case of relative vs. absolute positioning and the fields decided to go away (literaly)
A bunch of debugging with firebug-lite (btw was real to get it to work on my IE, kept on crashing or refusing to load altogether combined with IE popup and security issues) and I understoid that this was the issue, then some pixel fiddling and all was good. rechecked in Chrome, saw that result was exactly the same. job done

richfaces 3.3.3 problem with ie6

I am working using richfaces 3.3.3 , tomcat 6. when i try to access my application using IE6 and the windows language is set to arabic, i get the following exception:
IllegalArgumentException: Parameter "size" for convert from HTML to java can not be decoded: [1px], reason: Unparseable number: "1px".
when i change the windows language back to english, restart the server and try to log in again everything works fine..
Can anybody please help me with this issue
You have this problem. Unfortunately it seems to be a bug in the NumberFormat class.
I managed to find a workaround: In your rich:tabPanel, add the attribute headerSpacing="1" (without any unit). This will solve the parser problem. Took me quite a while debugging jsf and jdk to find out...
One more thing you need to do: In your skin, set generalSizeFont to a value without a unit. I.e. for example "generalSizeFont=11". Otherwise you will get the exception for icons (they will still work, though).

Resources