Input Number component not working after primefaces 8 upgrade - primefaces

Upgraded application from primefaces 5.3.6 to 8 version.According to migration guide as inputNumber component migrated from PrimeFaces Extensions to PrimeFaces.I have changed following code in xhtml:
XHTML:
<pe:inputNumber id="inputNumber1" decimalPlaces="0" maxValue="100" value="#{value1}">
<p:ajax update="inputNumber1" />
</pe:inputNumber>
to
<p:inputNumber id="inputNumber1" decimalPlaces="0" maxValue="100" value="#{value1}">
<p:ajax update="inputNumber1" />
</p:inputNumber>
After page loads getting error in developer tool console
SCRIPT5007: Invalid operand to 'in': Object expected
inputnumber.js.xhtml (14,17905)
Getting below error also as I tried to enter value 24 in inputNumber component
SCRIPT5007: Unable to get property 'getNumericString' of undefined or null reference
inputnumber.js.xhtml (109,2133)

Related

API Management JWT with invalid child element issuer-signing-keys

I am trying to set a validate-jwt token policy on my test instance of API Magement and I keep getting the following error:
Error in element 'validate-jwt' on line 15, column 10: The element 'validate-jwt' has invalid child element 'issuer-signing-keys'. List of possible elements expected: 'required-claims'.
Here is the policy I am using:
<validate-jwt header-name="Authorization" failed-validation-httpcode="401" failed-validation-error-message="Unauthorized" require-expiration-time="true" require-scheme="Bearer" require-signed-tokens="true">
<issuers>
<issuer>https://myissuer.com</issuer>
</issuers>
<issuer-signing-keys>
<key>dGVzdF9rZXk=</key>
</issuer-signing-keys>
<required-claims>
<claim name="oid" match="all" />
</required-claims>
</validate-jwt>
The key is just a test but it a valid 64 encoded value.
Is there any order in which the elements should be set? or any dependency on other elements? I could not find anything about this in the documentation.
Thanks
It seems the the https on the issuer was the error...it worked after removing it

Overrite dataExporter method or realize lazy export in jsf

I use <p:dataExporter type="xls" target="reportTable" fileName="ExportResult"/> in my project. And i need some functionality.
<p:panelGrid columns="1" styleClass="currentReportTablesStyle" style="text-align: center">
<p:commandButton value="Load Data"
id="dataLoaderButton"
ajax="false"
action="#{QCforCCReportBean.LoadReport()}"/>
<h:outputText value="Export to format:"/>
<h:commandLink disabled="#{QCforCCReportBean.isNotAdministrator}">
<p:graphicImage name="/images/xls_file.png" width="24"/>
<p:dataExporter type="xls" target="reportTable" fileName="ExportResult"/>
</h:commandLink>
</p:panelGrid>
When i click to commandButton - "Load Data" for export data, triggered method from "#{QCforCCReportBean.LoadReport()}". This method have two variable in parameters: first and pageSize. I set This variables 0 and 50. It work cool. I have lazy and good pagination. For example 0-50, 50-100, 100 - 150 etc.
But when i tried export data, triggered some method "#{QCforCCReportBean.LoadReport()}" but variables is 0- 87587(or another big number. all rows from table) and my java crash with java.lang.OutOfMemoryError: GC overhead limit exceeded
I want override method for export data or modify dataExporter save data by parts
The magnificant PrimeFaces 5.2 Documentation states on page 132 a list of attributes. One of them is:
pageOnly 0 String Exports only current page instead of whole dataset
And on page #133 there even is an example:
PageOnly
By default dataExporter works on whole dataset, if you ’ d
like export only the data displayed on current page, set pageOnly to
true.
<p:dataExporter type="pdf" target="tableId" fileName="cars" pageOnly="true"/>

Jasper string functions method undefined error

Using Jasper Reports 5.6.1. Added some text functions to a previously working text field jrxml (just want to truncate if longer than 75 chars). Works in iReport Studio, but not in Java.
<textFieldExpression><![CDATA[IF(LEN($F{AccountName})<75,$F{AccountName},LEFT($F{AccountName},75)+"...")]]></textFieldExpression>
Error message:
Error occured while trying to fetch the HTML Output from the Jasper Service (Errors were encountered when compiling report expressions class file:
1. The method LEN(String) is undefined for the type ICC_1422636250096_198427
value = IF(LEN(((java.lang.String)field_AccountName.getValue()))<75,((java.lang.String)field_AccountName.getValue()),LEFT(((java.lang.String)field_AccountName.getValue()),75)+"..."); //$JR_EXPR_ID=9$
<->
2. The method LEFT(String, int) is undefined for the type ICC_1422636250096_198427
value = IF(LEN(((java.lang.String)field_AccountName.getValue()))<75,((java.lang.String)field_AccountName.getValue()),LEFT(((java.lang.String)field_AccountName.getValue()),75)+"..."); //$JR_EXPR_ID=9$
<-->
3. The method LEN(String) is undefined for the type ICC_1422636250096_198427
value = IF(LEN(((java.lang.String)field_AccountName.getOldValue()))<75,((java.lang.String)field_AccountName.getOldValue()),LEFT(((java.lang.String)field_AccountName.getOldValue()),75)+"..."); //$JR_EXPR_ID=9$
<->
4. The method LEFT(String, int) is undefined for the type ICC_1422636250096_198427
value = IF(LEN(((java.lang.String)field_AccountName.getOldValue()))<75,((java.lang.String)field_AccountName.getOldValue()),LEFT(((java.lang.String)field_AccountName.getOldValue()),75)+"..."); //$JR_EXPR_ID=9$
<-->
5. The method LEN(String) is undefined for the type ICC_1422636250096_198427
value = IF(LEN(((java.lang.String)field_AccountName.getValue()))<75,((java.lang.String)field_AccountName.getValue()),LEFT(((java.lang.String)field_AccountName.getValue()),75)+"..."); //$JR_EXPR_ID=9$
<->
6. The method LEFT(String, int) is undefined for the type ICC_1422636250096_198427
value = IF(LEN(((java.lang.String)field_AccountName.getValue()))<75,((java.lang.String)field_AccountName.getValue()),LEFT(((java.lang.String)field_AccountName.getValue()),75)+"..."); //$JR_EXPR_ID=9$
<-->
6 errors
)
I checked packages in jasperreports-5.6.1.jar file, includes functions package. Exhaustive web search turned up nothing. What could it be?
I have a similar error message. Where you able to resolve this? Works fine in Jaspersoft Studio 6.0.1, but throws this when compiling w/ Java:
The method IF(boolean, BigDecimal, BigDecimal) is undefined for the type Blank_A4_1_1423164610392_674232
Update: I was able to solve this by including the functions jar on my classpath. See that if that works for you. See jasperreports-functions-5.6.1.jar at http://sourceforge.net/projects/jasperreports/files/jasperreports/JasperReports%205.6.1/
When using GlassFish, verify that you have all jasper libraries on your production server. They should be under glassfish/domains/domain1/lib/ext. If the jars are not there (or some of them, such as the fonts or some other not non-requisite lib) you might experience the behavior you are describing.

How to fail Phing without triggering backtrace

Before my main phing task runs, it first checks that all required properties have been set. If a property is missing or invalid, it calls a FailTask to end execution - which works.
<if>
<equals arg1="${build.db.host}" arg2="" />
<then>
<fail msg="build.db.host is empty." />
</then>
</if>
Alas, the FailTask throws a BuildException (with the msg), which throws an 'error in IfTask' - both of which are displayed twice, with their backtraces, giving me a 60-line screen dump for a one line message!
Is there a way to suppress the backtraces, or to catch (and discard) the exceptions? Ideally, I'd see something like:
BUILD FAILED
/path/to/build.xml:728:6: build.db.host is empty
Total time: 0.3351 seconds
I'm running the latest version of Phing, from the commandline in Ubuntu 14.04.
The backtrace has been cleaned up as part of http://www.phing.info/trac/ticket/1087 (will be released in version 2.9.0). Thanks for the question!

byte? doesn't work as a parameter type in an iBatis parameterMap

According to the iBatis docs, using "byte?" as a type value should work in parameterMap. I'm using DataMapper version 1.6.1.
The error message I'm getting is: Could not load type from string value 'byte?'.
It's a configuration exception which shows this information in the stack trace:
The error occurred while loading
SqlMap.
Check the parameter mapping typeHandler attribute '' (must be a
ITypeHandlerCallback implementation).
The error occurred in [sqlMap embedded="MyApp.Data.Config.Rate.xml, MyApp" Mxmlns="http://ibatis.apache.org/dataMapper"]
Check the Rate.InsertParams.]
Here's the XML block for Rate.InsertParams:
<parameterMaps>
<parameterMap id="InsertParams" class="RateCategory">
<parameter property="RateId" column="RateId" type="int"/>
<parameter property="Name" column="Name" type="string" size="32"/>
<parameter property="Charge" column="Charge" type="decimal?"/>
<parameter property="ChargeTypeId" column="ChargeTypeId" type="byte?"/>
</parameterMap>
Any ideas why it won't work?
As far as I can tell, there isn't any "byte?" alias. Here is a proof.
You can also figure out what is for sure supported and what not from this file.
"Code never lies." Documentation does :(
After lots of asking and posting, the final answer is that the docs are wrong.
The official iBatis.Net forum had this to say:
"You have a few options:
just use type="byte"
don't specify the type
byte? is syntactic sugar System.Nullable`1[[System.Byte]]"
Which is basically what I had already figured out myself. int? works but byte? doesn't. Neither does short? or long?.
The docs need to be fixed.