Page 1 of 1
Extensions 6.2RC1 Available
Posted: 22 Jan 2018, 23:28
by Melloware
Primefaces Extensions RC1 is available as well now with...
Code: Select all
<dependency>
<groupId>org.primefaces.extensions</groupId>
<artifactId>primefaces-extensions</artifactId>
<version>6.2.RC1</version>
</dependency>
Re: Extensions 6.2RC1 Available
Posted: 22 Jan 2018, 23:56
by tandraschko
Great thanks! Didn't you release the resource jars?
Re: Extensions 6.2RC1 Available
Posted: 23 Jan 2018, 02:59
by Melloware
Codemirror was rolled into core Jar. However the Ckeditor jar was taking a while to sync over to Maven Central. Sometimes it takes a few minutes sometimes it takes a few hours
Re: Extensions 6.2RC1 Available
Posted: 23 Jan 2018, 10:26
by tandraschko
oh ok - all right
Re: Extensions 6.2RC1 Available
Posted: 01 Feb 2018, 15:32
by kukeltje
Maybe the 4.0 release STICKY topic should be unstuck. Or this one should as well...
Re: Extensions 6.2RC1 Available
Posted: 01 Feb 2018, 15:41
by Melloware
I have asked multiple times to have that thread not sticky. I wish I was an admin on this forum I could just update this myself!
Re: Extensions 6.2RC1 Available
Posted: 27 Feb 2018, 22:13
by Ibrahim Siripe
Hi,
With primefaces 6.1 timePicker works perfectly, but since I upgrade to primefaces 6.2 the same code doesn't work. What ever Extension 6.2RC1 or 6.2RC2 timepicker doesn't work. I get this error in chrome console "SyntaxError: Unexpected token }"
below my code :
Code: Select all
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:a="http://xmlns.jcp.org/jsf/passthrough"
xmlns:p="http://primefaces.org/ui"
xmlns:pe="http://primefaces.org/ui/extensions">
<div class="ui-g-12 ui-md-12 ui-lg-12">
<div class="card">
<p:cache region="horaire" key="js">
<script>
/* <![CDATA[ */
var debutime_hw = 'startTimeWidget' ;
var fintime_hw = 'endTimeWidget';
var selectperiodtable = function(el, deb, fin)
{
debutime_hw = deb;
fintime_hw = fin;
let curhor = 0 ;
let curmn = 0 ;
let trclose = $('.'+el).closest('tr');
if(!isUndefined(trclose))
{
let next = trclose.next();
if(!isUndefined(next))
{
let nextdebhor = 23 ;
let nextdebmn = 55 ;
let nextdatedeb = next.find('.datedeb').first() ;
if(!isUndefined(nextdatedeb))
{
let crenodeb = nextdatedeb.data('creno');
if (PrimeFaces.widgets[crenodeb]) {
nextdebhor = parseInt(PF(crenodeb).getHours());
nextdebmn = parseInt(PF(crenodeb).getMinutes());
}
console.log(nextdebhor+"/"+nextdebmn);
curhor = parseInt(PF(fintime_hw).getHours());
curmn = parseInt(PF(fintime_hw).getMinutes());
if(nextdebhor == 0 && nextdebmn == 0){
nextdebhor = 23 ;
nextdebmn = 55 ;
}
nextdebhor = Math.max(nextdebhor, curhor) ;
}
PF(fintime_hw).setMaxTime(nextdebhor, nextdebmn);
if(curhor == 0 && curmn==0)
{
PF(fintime_hw).setTime(nextdebhor+':'+nextdebmn);
}
}
let prev = trclose.prev();
if(!isUndefined(prev))
{
curhor = 0 ;
curmn = 0 ;
let prevfinhor = 0 ;
let prevfinmn = 5 ;
let datefin = prev.find('.datefin').first() ;
if(!isUndefined(datefin))
{
let crenofin = datefin.data('creno');
if (PrimeFaces.widgets[crenofin]) {
prevfinhor = parseInt(PF(crenofin).getHours());
prevfinmn = parseInt(PF(crenofin).getMinutes());
}
curhor = parseInt(PF(debutime_hw).getHours());
curmn = parseInt(PF(debutime_hw).getMinutes());
if(prevfinhor == 0 && prevfinmn == 0){
prevfinmn = 5 ;
}
}
PF(debutime_hw).setMinTime(prevfinhor, prevfinmn);
console.log(curhor+"-"+curmn);
if(curhor == 0 && curmn==0)
{
PF(debutime_hw).setTime(prevfinhor+':'+prevfinmn);
}
}
}
};
var selectperiodadd = function(deb, fin){
debutime_hw = deb;
fintime_hw = fin;
};
// Use case 2
function onHourShowCallback(hour) {
if ((hour > 20) || (hour < 6)) {
return false; // not valid
}
return true; // valid
}
function onMinuteShowCallback(hour, minute) {
if ((hour == 20) && (minute >= 30)) {
return false; // not valid
}
if ((hour == 6) && (minute < 30)) {
return false; // not valid
}
return true; // valid
}
// Use case 3
function tpStartOnHourShowCallback(hour) {
if (!PrimeFaces.widgets[fintime_hw]) {
return false;
}
var tpEndHour = parseInt(PF(fintime_hw).getHours());
// Check if proposed hour is prior or equal to selected end time hour
if (parseInt(hour) <= tpEndHour) {
return true;
}
// if hour did not match, it can not be selected
return false;
}
function tpStartOnMinuteShowCallback(hour, minute) {
if (!PrimeFaces.widgets[fintime_hw]) {
return false;
}
var tpEndHour = parseInt(PF(fintime_hw).getHours());
var tpEndMinute = parseInt(PF(fintime_hw).getMinutes());
// Check if proposed hour is prior to selected end time hour
if (parseInt(hour) < tpEndHour) {
return true;
}
// Check if proposed hour is equal to selected end time hour and minutes is prior
if ((parseInt(hour) == tpEndHour) && (parseInt(minute) < tpEndMinute)) {
return true;
}
// if minute did not match, it can not be selected
return false;
}
function tpEndOnHourShowCallback(hour) {
if (!PrimeFaces.widgets[debutime_hw]) {
return false;
}
var tpStartHour = parseInt(PF(debutime_hw).getHours());
// Check if proposed hour is after or equal to selected start time hour
if (parseInt(hour) >= tpStartHour) {
return true;
}
// if hour did not match, it can not be selected
return false;
}
function tpEndOnMinuteShowCallback(hour, minute) {
if (!PrimeFaces.widgets[debutime_hw]) {
return false;
}
var tpStartHour = parseInt(PF(debutime_hw).getHours());
var tpStartMinute = parseInt(PF(debutime_hw).getMinutes());
// Check if proposed hour is after selected start time hour
if (parseInt(hour) > tpStartHour) {
return true;
}
// Check if proposed hour is equal to selected start time hour and minutes is after
if ((parseInt(hour) == tpStartHour) && (parseInt(minute) > tpStartMinute)) {
return true;
}
// if minute did not match, it can not be selected
return false;
}
/* ]]> */
</script>
</p:cache>
<!-- DEBUT RUBRIQUES MENU OF THIS PAGE -->
<ui:include src="/WEB-INF/rubriquespage.xhtml" />
<ui:fragment rendered="#{empty horaireBean.blockmessage}">
<!-- FIN RUBRIQUES MENU OF THIS PAGE -->
<div id="pagecontent">
<ui:fragment rendered="#{userSessionBean.creer}">
<div class="titlehd">Ajout des horaires</div>
<hr />
<h:form id="formnewedit" class="formnewedit" autocomplete="off" >
<p:focus/>
<div class="formstyle ui-fluid ui-g-12 ui-md-12 ui-lg-12">
<div class="ui-g-6 ui-md-3 ui-lg-3 formitem">
<p:outputLabel for="libhoraire" value="Libellé horaire (facultatif)"/>
</div>
<div class="ui-g-6 ui-md-4 ui-lg-4 formitem">
<p:inputText id="libhoraire" placeholder="cours, récréation, pause déjeuner..." value="#{horaireBean.newData.nomhor}" autocomplete="on" />
</div>
<div style="clear:both;"></div>
<div class="ui-g-6 ui-md-3 ui-lg-3 formitem">
<p:outputLabel for="codehoraire" value="Code horaire"/>
</div>
<div class="ui-g-6 ui-md-4 ui-lg-4 formitem">
<p:inputText id="codehoraire" placeholder="H1, H2,...." value="#{horaireBean.newData.codehor}" required="true" >
<p:clientValidator />
</p:inputText>
</div>
<div style="clear:both;"></div>
<div class="ui-g-6 ui-md-3 ui-lg-3 formitem">
<p:outputLabel for="debhor" value="horaire"/>
</div>
<div class="ui-g-6 ui-md-4 ui-lg-4 formitem">
<p:outputPanel id="creneau" style="padding:0;margin:0;">
<pe:timePicker id="debhor" value="#{horaireBean.newData.debutdate}" mode="popup" onHourShow="tpStartOnHourShowCallback" onMinuteShow="tpStartOnMinuteShowCallback" widgetVar="startTimeWidget" showCloseButton="true" locale="fr_FR" minHour="#{horaireBean.minmaxdate.get('minhr')}" minMinute="#{horaireBean.minmaxdate.get('minmn')}" required="true">
<pe:javascript event="beforeShow" execute="selectperiodadd('startTimeWidget', 'endTimeWidget')" />
</pe:timePicker>
<h:outputText value="-" style="text-align: center;margin:0 10px;" />
<pe:timePicker id="finhor" value="#{horaireBean.newData.findate}" mode="popup" onHourShow="tpEndOnHourShowCallback" onMinuteShow="tpEndOnMinuteShowCallback" showCloseButton="true" widgetVar="endTimeWidget" locale="fr_FR" required="true" >
<pe:javascript event="beforeShow" execute="selectperiodadd('startTimeWidget', 'endTimeWidget')" />
</pe:timePicker>
</p:outputPanel>
</div>
<div style="clear:both;"></div>
<div class="ui-g-6 ui-md-3 ui-lg-3 formitem">
<p:outputLabel for="hcours" value="Séance de cours"/>
</div>
<div class="ui-g-6 ui-md-4 ui-lg-4 formitem">
<p:inputSwitch id="hcours" value="#{horaireBean.newData.ouvert}" onLabel="Oui" offLabel="Non" style="width: auto;"/>
</div>
<div style="clear:both;"></div>
<div class="ui-sm-12 ui-md-12 ui-lg-12">
<p:commandButton process="@form" update="@form,:formdatable:datatable,:growl" validateClient="true" type="Submit" value="Enregistrer" icon="fa fa-save" actionListener="#{horaireBean.enregistrer}" id="btnSave" class="btnSave" />
</div>
<p:spacer width="100%" height="10"/>
</div>
<p:contextMenu for="formnewedit" style="display:none;">
<ui:include src="/WEB-INF/contextmenunewedit.xhtml">
<ui:param name="formnormal" value="formnewedit" />
</ui:include>
</p:contextMenu>
</h:form>
<div class="ui-g-12 ui-sm-12 ui-md-12 ui-lg-12"></div>
<p:spacer width="100%" height="30"/>
</ui:fragment>
<div class="titlehd">Liste des horaires</div>
<hr />
<p:outputPanel deferred="true">
<h:form id="formdatable" class="formdatable" onkeypress="if (event.keyCode == 13) { SCupdateditable('formdatable'); return false; }">
<p:remoteCommand process="@this" update="@form,:topanelnotif" name="notifyserverCmd" actionListener="#{horaireBean.notifierCmd}" oncomplete="updateAffichageNotification();" />
<p:remoteCommand process="@form" update="datatable,:growl" name="yesnotCmd" actionListener="#{horaireBean.approuverefuser}" />
<p:remoteCommand process="@form" update="datatable,:growl" name="unlockCmd" actionListener="#{horaireBean.deverrouiller}" />
<p:remoteCommand process="@form" update="datatable,:formnewedit:creneau,:growl" name="deleteCmd" actionListener="#{horaireBean.supprimer}" />
<p:dataTable id="datatable" widgetVar="datatable" var="data" value="#{horaireBean.dataList}" editable="#{userSessionBean.modifier}" filteredValue="#{horaireBean.datafilterList}" emptyMessage="Aucune donnée enregistrée" selection="#{horaireBean.datableSels}" rowKey="#{data.idhor}" styleClass="DTable" rowStyleClass="notifrow#{data.statut}" reflow="true" clientCache="false" rowHover="true" draggableColumns="true" resizableColumns="true" paginator="true" paginatorPosition="bottom" paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown} lignes par page" currentPageReportTemplate="Total {totalRecords} | Page {currentPage} / {totalPages}" rows="25" rowsPerPageTemplate="10,25,50,100,150,250,500,750,1000">
<ui:param name="islock" value="#{data.verrouiller eq 1}" />
<p:ajax update=":growl,:formnewedit:creneau" event="rowEdit" listener="#{horaireBean.modifier}" />
<!-- DEBUT DATATABLE HEADER -->
<f:facet name="header">
<ui:include src="/WEB-INF/datableheader.xhtml">
<ui:param name="doc_nom" value="horaires_de_cours" />
<ui:param name="doc_titre" value="Horaires de cours" />
<ui:param name="filtre_off" value="true" />
</ui:include>
</f:facet>
<!-- FIN DATATABLE HEADER -->
<p:column headerText="Code horaire" filterStyle="display:none" sortBy="#{data.codehor}" style="text-align: center;">
<f:facet name="header">
<h:outputText value="Code horaire" />
</f:facet>
<p:cellEditor>
<f:facet name="output"><h:outputText class="selectionable" value="#{data.codehor}" /></f:facet>
<f:facet name="input">
<h:inputText value="#{data.codehor}" style="margin-left:2%;width:96%;" required="true" disabled="#{islock}">
<f:validateLength minimum="2" />
<p:clientValidator />
</h:inputText>
</f:facet>
</p:cellEditor>
</p:column>
<p:column headerText="Debut" sortBy="#{data.debutdateTime}" style="text-align: center;">
<f:facet name="header">
<h:outputText value="Debut" />
</f:facet>
<p:cellEditor>
<f:facet name="output">
<h:outputText class="selectionable" value="#{data.debutdate}" >
<f:convertDateTime type="time" pattern="HH:mm" />
</h:outputText>
</f:facet>
<f:facet name="input">
<pe:timePicker value="#{data.debutdate}" mode="popup" onHourShow="tpStartOnHourShowCallback" onMinuteShow="tpStartOnMinuteShowCallback" showCloseButton="true" locale="fr_FR" required="true" a:data-creno="crenodeb#{data.idhor}" widgetVar="crenodeb#{data.idhor}" styleClass="datedeb crenodeb#{data.idhor}" disabled="#{islock}" >
<pe:javascript event="beforeShow" execute="selectperiodtable('crenodeb#{data.idhor}','crenodeb#{data.idhor}', 'crenofin#{data.idhor}')" />
</pe:timePicker>
</f:facet>
</p:cellEditor>
</p:column>
<p:column headerText="Fin" sortBy="#{data.findateTime}" style="text-align: center;">
<f:facet name="header">
<h:outputText value="Fin" />
</f:facet>
<p:cellEditor>
<f:facet name="output">
<h:outputText class="selectionable" value="#{data.findate}" >
<f:convertDateTime type="time" pattern="HH:mm" />
</h:outputText>
</f:facet>
<f:facet name="input">
<pe:timePicker value="#{data.findate}" mode="popup" onHourShow="tpEndOnHourShowCallback" onMinuteShow="tpEndOnMinuteShowCallback" showCloseButton="true" locale="fr_FR" required="true" a:data-creno="crenofin#{data.idhor}" widgetVar="crenofin#{data.idhor}" styleClass="datefin crenofin#{data.idhor}" disabled="#{islock}" >
<pe:javascript event="beforeShow" execute="selectperiodtable('crenofin#{data.idhor}','crenodeb#{data.idhor}', 'crenofin#{data.idhor}')" />
</pe:timePicker>
</f:facet>
</p:cellEditor>
</p:column>
<p:column headerText="Libellé horaire" style="text-align: center;">
<f:facet name="header">
<h:outputText value="Horaire" />
</f:facet>
<p:cellEditor>
<f:facet name="output"><span class="selectionable">#{data.nomhor}</span></f:facet>
<f:facet name="input">
<h:inputText value="#{data.nomhor}" style="margin-left:2%;width:96%;" disabled="#{islock}" />
</f:facet>
</p:cellEditor>
</p:column>
<p:column headerText="Séance de cours" sortBy="#{data.valid}" style="text-align: center;">
<f:facet name="header">
<h:outputText value="Séance de cours" />
</f:facet>
<p:cellEditor>
<f:facet name="output"><span class="selectionable">#{data.ouvert ? 'Oui' : 'Non' }</span></f:facet>
<f:facet name="input">
<p:selectBooleanButton value="#{data.ouvert}" onLabel="Oui" offLabel="Non" onIcon="fa fa-check-square-o" offIcon="fa fa-square-o" style="width:auto;" disabled="#{islock}" />
</f:facet>
</p:cellEditor>
</p:column>
<!-- DEBUT DATATABLE ADMIN COLUMNS -->
<ui:include src="/WEB-INF/datableadmincolumns.xhtml">
<ui:param name="dto" value="#{data}" />
</ui:include>
<!-- FIN DATATABLE ADMIN COLUMNS -->
</p:dataTable>
<p:contextMenu for="formdatable" style="display:none;">
<ui:include src="/WEB-INF/contextmenudatable.xhtml">
<ui:param name="formdatable" value="formdatable" />
</ui:include>
</p:contextMenu>
</h:form>
</p:outputPanel>
</div>
</ui:fragment>
</div>
</div>
<ui:include src="/WEB-INF/blockpage.xhtml">
<ui:param name="bean" value="#{horaireBean}" />
</ui:include>
<p:cache region="aide" key="horaire">
<p:notificationBar id="aideBar" position="bottom" effect="slide" styleClass="bottom" widgetVar="aideBar">
<h:outputText value="AIDE !" styleClass="nbtitle" />
<p:outputPanel styleClass="nbcontent">
<ui:include src="/WEB-INF/aidebargeneral.xhtml" />
</p:outputPanel>
</p:notificationBar>
</p:cache>
</ui:composition>
Re: Extensions 6.2RC1 Available
Posted: 28 Feb 2018, 04:24
by Melloware
Can you strip this down to a simpler example that reproduces the problem?
I see a ton of custom JavaScript in your example that makes this hard to diagnose.
Re: Extensions 6.2RC1 Available
Posted: 28 Feb 2018, 17:05
by Ibrahim Siripe
Hi Melloware,
Sorry, bellow short code
Primefaces 6.2 RC2 (same issue with RC1)
PF Extensions 6.2RC2 (same issue with RC1)
Code: Select all
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:a="http://xmlns.jcp.org/jsf/passthrough"
xmlns:p="http://primefaces.org/ui"
xmlns:pe="http://primefaces.org/ui/extensions">
<div class="ui-g-12 ui-md-12 ui-lg-12">
<div class="card">
<!-- FIN RUBRIQUES MENU OF THIS PAGE -->
<div id="pagecontent">
<div class="titlehd">Ajout des horaires</div>
<hr />
<h:form id="formnewedit" class="formnewedit" autocomplete="off" >
<p:focus/>
<div class="formstyle ui-fluid ui-g-12 ui-md-12 ui-lg-12">
<div class="ui-g-6 ui-md-3 ui-lg-3 formitem">
<p:outputLabel for="horaire" value="Horaire"/>
</div>
<div class="ui-g-6 ui-md-4 ui-lg-4 formitem">
<pe:timePicker id="horaire" value="#{timePickerController.time2}" mode="popup" widgetVar="popupTimeWidget" label="Popup time picker"/>
</div>
</div>
</h:form>
</div>
</div>
</div>
</ui:composition>
Timepicker doesn't work and I got bellow error in chrome console
Code: Select all
index.xhtml:1 Uncaught SyntaxError: Unexpected token }
at p (jquery.js.xhtml?ln=primefaces&v=6.2.RC2:2)
at Ja (jquery.js.xhtml?ln=primefaces&v=6.2.RC2:3)
at r.fn.init.replaceWith (jquery.js.xhtml?ln=primefaces&v=6.2.RC2:3)
at Object.updateElement (core.js.xhtml?ln=primefaces&v=6.2.RC2:3)
at Object.doUpdate (core.js.xhtml?ln=primefaces&v=6.2.RC2:3)
at Object.handle (core.js.xhtml?ln=primefaces&v=6.2.RC2:3)
at Object.<anonymous> (core.js.xhtml?ln=primefaces&v=6.2.RC2:3)
at i (jquery.js.xhtml?ln=primefaces&v=6.2.RC2:2)
at Object.fireWith [as resolveWith] (jquery.js.xhtml?ln=primefaces&v=6.2.RC2:2)
at A (jquery.js.xhtml?ln=primefaces&v=6.2.RC2:4)
Re: Extensions 6.2RC1 Available
Posted: 01 Mar 2018, 01:01
by Melloware
I can't seem to reproduce your issue. TimePicker is working fine for me in 6.2 with no JS errors.