-
Notifications
You must be signed in to change notification settings - Fork 492
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade to PrimeFaces 8 #6634
Comments
|
After our discussion in sprint planning, I went and dug up the PrimeFaces 8 breaking changes outline that I saw on GitHub and add it to my original comment on the issue. Nothing too major. I searched the project for some of the changes, |
OK, after switching PrimeFaces from 7.0 to 8.0 in the pom.xml, the code would not compile successfully. I was able to get it to compile by making 3 changes in our code: • References to org.primefaces.model.UploadedFile became org.primefaces.model.file.UploadedFile and called on that class to getInputstream became getInputStream (note the captial "S") (the 2nd one is not mentioned above in the migration guide, but like I noted, they were all unused imports anyway) Now, we can test to see if there are any functional changes that occur from PF 8. |
Some quick testing - crated a user, dataverse, datset - all worked as expected. However, attempting to add a file did not. It went through the upload, but then did not add it to the list. |
@scolapasta I didn't get as far as a successful deploy when I quickly tried to start a PrimeFaces 8 branch after it was released. Did you catch all the "models have been moved from There are a lot (11 by searching the project in NetBeans) of those references to change. There are also 8 references to |
When it's available, we should upgrade. Have not seen any updates from PrimeFaces.
Blocked/related(?) issues:
More details on the changes from 7.0 in the Migration Guide.
7.0 to 8.0
Breaking Changes
p:component
has been removed in favor of:p:resolveFirstComponentWithId('myId', view).clientId
p:widgetVar
have been removed in favor of:p:resolveWidgetVar('myTable', view)
DefaultStreamedContent
: Constructors and setters have been deprecated in favor ofDefaultStreamedContent.Builder
ByteArrayContent
has been removed in favor ofDefaultStreamedContent.Builder#stream(() -> new ByteArrayInputStream(...))
LazyDefaultStreamedContent
has been removed, instead useDefaultStreamedContent
with aSupplier
which will always "lazy-creates" the InputStream:DefaultStreamedContent.Builder#stream(() -> new FileInputStream(...))
PrimeFaces#clearTableStates()
andPrimeFaces#clearDataListStates()
have been deprecated in favor ofPrimeFaces#multiViewState()
getFilters
/setFilters
has been removed in favor ofgetFilterBy
/setFilterBy
LazyDataModel#load
signatures has been changed; sortBy is now a Map instead of List, filterBy Map value is now aFilterMeta
object instead the filter value. Please note that there is a change between 8.0RC1 and 8.0RC2.DynamicMenuModel
has been removed, useBaseMenuModel
instead.org.primefaces.model
toorg.primefaces.model.file
UploadedFile#getContents
has been renamed togetContent
UploadedFile#getInputstream
has been renamed togetInputStream
FileUpload#fileUploadListener
has been renamed intolistener
UploadedFiles
model to get all files in a single request.org.primefaces.component.export.Exporter
interface allows you to implement your own exporter usingexporter
attributerepeat
attribute: used as a workaround in case of tables contained in an iterator component (e.gui:repeat
,p:tabView
etc.). No longer necessary, instead, define every ids component you wish to export (without specifying component index)secure="false"
.$.mask.definitions
for example: InputMask: lack of user input validation primefaces/primefaces#3234 (comment)p:watermark
has been reimplemented with a simple HTML placeholder attribute. ThereforePrimeFaces.cleanWatermarks()
andPrimeFaces.showWatermarks()
has been removed.emptyValue
:sign
is nowalways
symbolPosition
:prefix
is nowp
,suffix
is nows
decimalPlaces
: now defaults to 2TimelineEvent
usesjava.time.LocalDateTime
instead ofjava.util.Date
TimelineEvent
has now 3 more properties to fine tunning editable: editableTime, editableGroup and editableRemove.TimelineGroup
has now styleClass property similar to the one in TimelineEvent.axisOnTop
,groupsChangeable
,groupsWidth
,groupMinHeight
,snapEvents
,timeChangeable
.dragAreaWith
(use css classes instead),unselectable
,groupsOnRight
,animate
,animateZoom
,showButtonNew
,showNavigation
,browserTimeZone
.maxHeight
,orientationAxis
,orientationItem
,editableAdd
,editableTime
,editableGroup
,editableRemove
,editableOverrideItems
,eventHorizontalMargin
,eventVerticalMargin
,groupStyle
,snap
,clickToUse
,clientTimeZone
.extender
property to specify a javascript function to extend configuration of vis.js timeline component similar to extender property in<p:chart />
component.ScheduleEvent
usesjava.time.LocalDateTime
instead ofjava.util.Date
dayGridMonth
,dayGridWeek
,dayGridDay
,timeGridWeek
,timeGridDay
,listYear
,listMonth
,listWeek
,listDay
): old ones are translated by Schedule componentScheduleEntryMoveEvent
: new propertiesyearDelta
andmonthDelta
ScheduleEntryResizeEvent
: new propertiesyearDelta
andmonthDelta
: splitted properties between start and end (up to PF 7.0 only end)slotLabelFormat
was removed (only available in commercial version of FullCalendar - see https://fullcalendar.io/docs/slotLabelFormat)ScheduleEvent
: new propertiesgroupId
andoverlapAllowed
java.time.LocalDate
. (up to PrimeFaces 7.0:java.util.Date
) This may be relevant when you use Calendar or DatePicker as a filter for eg DataTable. You can add something like<f:convertDateTime type="date" />
to your Calendar or DatePicker to get a java.util.Date.Others
DefaultMenuItem#builder()
)TimelineEvent#builder()
)DefaultScheduleEvent#builder()
)DefaultStreamedContent
using builders (e.gDefaultStreamedContent#builder()
)java.time.LocalDate
,java.time.LocalDateTime
andjava.time.LocalTime
(no converter needed anymore)MenuModel#addElement()
has been deprecated, add element usingMenuModel#getElements()#add()
instead.The text was updated successfully, but these errors were encountered: