Data List pagination primefaces mobile 5.2 not working - primefaces

The pagination of my datalist is not working on primefaces mobile, it shows 1000 rows instead of 5! I changed my pf version from 5.1 to 5.2 and nothing happened. I checked the showcase and read the pf 5.2 guide and I don't find the solution. Here my code :
listPromotion.xhtml
<ui:composition
xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:pm="http://primefaces.org/mobile"
xmlns:p="http://primefaces.org/ui"
xmlns:pt="http://xmlns.jcp.org/jsf/passthrough"
>
<pm:header title="Vos promotions"></pm:header>
<pm:content>
<h:form id="form2">
<p:outputPanel autoUpdate="true">
<p:dataList value="#{partnerListPromotion.promotions}"
var="promotion"
pt:data-inset="true"
paginator="true"
rows="5">
<p:commandLink
action="#{partnerListPromotion.
goToPartnerDetailPromotion(promotion)}"/>
</p:dataList>
</p:outputPanel>
</h:form>
</pm:content>
index.xhtml Note that dev.xtml is just a way to access to listPromotion.xhtml.
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:pm="http://primefaces.org/mobile"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:p="http://primefaces.org/ui">
<f:view renderKitId="PRIMEFACES_MOBILE" />
<h:head>
<script type="text/javascript" src="javascript/geolocalisationPartner.js"></script>
<script type="text/javascript" src="javascript/refreshTimePromotion.js"></script>
</h:head>
<h:body>
<!-- dev -->
<pm:page id="dev" lazy ="false">
<ui:include src="trash/dev.xhtml"/>
</pm:page>
<pm:page id="partnerListPromotion" lazy="true">
<ui:include src="/Partner/listPromotion.xhtml"/>
</pm:page>
</h:body>
My maven pom.xml :
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>5.2</version>
</dependency>
Thanks.

The problem was glassfish still used primefaces 5.1 even if I put primefaces 5.2 in my pom.xml. So I had to remove all the primefaces folder in the maven repository in my home : .m2/repository/org/primefaces except 5.2. Then Glassfish used 5.2 and pagination worked !

Related

pe:inputPhone validatorMessage attribute is ignored

I have this code here for the PrimeFaces Extensions pe:inputPhone in my project.
I want to have a custom validator message when the phone number is not valid. However the validatorMessage attribute is not working and the standard one is always showing. Does anyone know how I could solve it?
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:ic="http://ivyteam.ch/jsf/component"
xmlns:p="http://primefaces.org/ui"
xmlns:pe="http://primefaces.org/ui/extensions">
<h:body>
<ui:composition template="/layouts/frame-8.xhtml">
<ui:define name="title">UiTesting</ui:define>
<ui:define name="content">
<h:outputStylesheet name="testing.css" />
<h:form id="form">
<p:growl/>
<p:messages />
<pe:inputPhone value="" id="telefon" initialCountry="de" widgetVar="phonenumber"
requiredMessage="Phone required"
validatorMessage="Number not valid"
required="true" onchange="this.value=PF('phonenumber').getNumber();"
data-cy="phonenumber" formatOnDisplay="false">
</pe:inputPhone>
</h:form>
</ui:define>
</ui:composition>
</h:body>
</html>
Thanks for reporting this issue. It will be fixed in PrimeFaces Extensions 11.0.3.
See also:
https://github.com/primefaces-extensions/primefaces-extensions/pull/769
Please note that you will need to add the libphonenumber dependency to your project in order to be able to validate phone numbers.
<dependency>
<groupId>com.googlecode.libphonenumber</groupId>
<artifactId>libphonenumber</artifactId>
<version>...</version>
</dependency>
Until 11.0.3 is released, you could create a custom validator and use that as a workaround.

PF10 Primefaces p:breadcrumb doesn't show separators among items

Environment:
Jboss 7.2
Java 22
JSF 2.3
Primefaces 10
PF Themes Avalon, ui-lightness
I've migrated from PF8 to PF10 and p:breadcrumb doesn't show separators among menu items. Is there some incompatibility with PF10 and some themes?
Basic breadcrumb
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:p="http://primefaces.org/ui">
<h:head>
</h:head>
<h:body>
<h:form>
<div class="card">
<p:breadCrumb>
<p:menuitem value="Electronics"/>
<p:menuitem value="Computer"/>
<p:menuitem value="Notebook"/>
<p:menuitem value="Accessories"/>
<p:menuitem value="Backpacks"/>
<p:menuitem value="Item"/>
</p:breadCrumb>
</div>
</h:form>
</h:body>
</html>
You need a new Avalon theme from your PrimeStore account that is updated for PF10.0.0.
According to this page Avalon is complete and should be in your PrimeStore account for download: https://github.com/primefaces/primefaces/wiki/Updates-Of-Premium-Templates-For-PrimeFaces-X

primefaces: selectonemenu does not open on all pages

I am new to primefaces and already facing problems with the "selectOneMenu" component. I have implemented a mainMenu.xhtml file, which is visible on all my pages. This mainmenu has a "selectOneMenu" component for language Change. The "selectOneMenu" does not open on the start page and several other pages, but there are also pages where it opens and works as it should. I've searched the net for a couple of days now, and couldn't find any hint or suggestion, that solved my Problem.
Would be very nice to find some help here.
See code below: Identity_Session is a #SessionScoped-bean; The "languageSet" is a HashMap of (String, Integer) pairs.
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:p="http://primefaces.org/ui"
xmlns:f="http://xmlns.jcp.org/jsf/core">
<h:head>
</h:head>
<h:body>
<h:form>
<p:panel>
<h:panelGrid columns="2" cellpadding="5" style="right: 700px; position: absolute; margin-top: -7px;" rendered="#{identity_Session.showMenuLogout()}">
<p:outputLabel for="languageComboBox" value=" #{identity_Session.translate('outputlabel_language')}:" style="font-weight:bold"/>
<p:selectOneMenu id="languageComboBox" value="#{identity_Session.languageID}" style="width:150px">
<p:ajax listener="#{identity_Session.translationAction()}" update="#all" delay="1000"/>
<f:selectItems value="#{identity_Session.getLanguageSet()}" />
</p:selectOneMenu>
</h:panelGrid>
</p:panel>
</h:form>
<br/>
<br/>
</h:body>
</html>
UPDATE!!!
I am using the same selectOneMenu with the same values (as described above) on the same webPage. When I place the selectOneMenu in the "west"-layoutUnit it does not open, but when I place it in the "east"-layoutUnit it opens. Is this actually a "PrimeFaces"-Bug, or am I missing something?
Try to change
</f:panel>
to
</p:panel>

Primefaces selectOneMenu opens only once

I'm facing a strange behavior: a Primeface selectOneMenu opens only once. After the menu is closed for the first time I can't open it again... Replacing the 'p' in with 'h' will show the default menu which works perfectly fine.
EDIT:
<?xml version="1.0"?>
<f:view xmlns="http://www.w3.org/1999/xhtml"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.org/ui">
<h:head />
<h:body>
<p:selectOneMenu value="#{...}">
<f:selectItem itemLabel="less than 98%" itemValue="less than 98%" />
<f:selectItem itemLabel="98 - 99,5%" itemValue="98 - 99,5%" />
<f:selectItem itemLabel=">= 99,5%" itemValue=">= 99,5%" />
</p:selectOneMenu>
</h:body>
</f:view>
Does anyone know what do to?
Thank you in advance :)
PS: I'm using Chrome web browser
It had to do with jQuery which wasn't properly added to the project.

p:editor visible in chrome but not rendered properly in IE

The editor doesn't appears in my IE window while it works correctly in chrome
I have implemented p:layout and in the center layoutunit I am including the template.xhtml using ui:include which is enclosed in a
<h:form id="centercontentpanel">
Kindly guide me with what corrections needs to be done to make it visible in IE 8
Template.xhtml
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:p="http://primefaces.org/ui"
xmlns:f="http://java.sun.com/jsf/core">
<h:body>
<f:view>
<p:editor id="editor" value="#{editorBean.value}"/>
<h:panelGrid columns="2" style="margin-top:10px">
<p:commandButton id="submitButton" value="Submit" update="display" oncomplete="editordlg.show()"
icon="ui-icon-disk" />
<p:commandButton id="clearButton" type="button" value="Clear" onclick="editor.clear()"
icon="ui-icon-close"/>
</h:panelGrid>
<p:dialog header="Content" widgetVar="editordlg" showEffect="fade" hideEffect="fade" modal="true">
<h:outputText id="display" value="#{editorBean.value}" escape="false" />
</p:dialog>
</f:view>
</h:body>
</html>
For all i know, the IE 8 doesn't support Primefaces Editor, still in IE 11.
Actually i can render it, but nothing works, not even the bold/italic/underline.
I think it's because the way IE process javascript... but i don't know much about technical issues.
(My tests were done on IE 11 and Primefaces 4.0, plain programming, didn't twitch anything)
Only for the RichText i'm using the HTML5 library wysihtml5 (GIT)
EDIT:
I'm sorry, i just stumbled on the answear to my problem (Editing on IE), hope it fixes yours
Just add contentType="text/html" to the <f:view> like this <f:view contentType="text/html">
Here is the post from Optimus (Even though it's a rendering problem for chrome)