Reputation: 63
I have not lot work experience with PrimeFaces. I have to migrate a java web PrimeFaces project from 3.4 to 5.2. Although I searched it all over the internet there was not proper solution for my situation. If you ever have any experience with this kind of problem or ever heard of that please let me know or send me link for that. Basically I want to the way of doing it. I already have idea about witch component should be changed. Is there anything to do except replacing the jar? I already tried to replace PrimeFaces 3.4 with PrimeFaces 5.2 jar. But it does not allow me to replace the jar. Do I have to to change the code too? Please i want the migration steps.
Upvotes: 1
Views: 3383
Reputation: 2253
There is a PrimeFaces migration guide. you need to go step by step to get from 3.5 to 5.2.
Here is the full migration guide for your situation:
Copied from MigrationGuide
3.4 to 3.5 Component Changes
- DateSelectEvent, ScheduleDateSelectEvent, ScheduleEntrySelectEvents classes are removed, use SelectEvent instead.
- Column class in SortEvent and ColumnResizeEvent is replaced with UIColumn to support dynamic columns.
- Scrollable and Resizable DataTable-TreeTable features are reimplemented. DataTable and TreeTable no longer render cell container div element with classes ui-dt-c and ui-tt-c.
- Sheet component is removed as it duplicated functionality of DataTable. Galleria is reimplemented.
General Changes
- IE7 support is phased out.
3.5 to 4.0 Component Changes
MenuModel is rewritten and not backward compatible with the old version.
(skip this when e.g. directly migrating from 3.x to 5.x, it is 'reverted' again in 5.0) DataTable sortBy and filterBy expressions require the plain property name meaning "name" instead of "
#{person.name}
". Backward compatibility is maintained for expressions like "#{var.property}
" but not for complex expressions.FileUpload is reimplemented and it is backward compatible except "showButtons" option is removed.
disabledSelection option of column, moved to DataTable, change is backward compatible and the option will be removed from column in a future release.
AutoComplete: removed process/global/onstart/oncomplete in favor of "
p:ajax event="query
" process/global/onstart/oncomplete"General Changes
- Preferred way of accessing widgets is via
PF('widgetVarName').show()
, old way (e.g.widgetVarName.show()
) is still supported and will be removed in a future version.4.0 to 5.0 Component Changes
Chart components are deprecated in favor of new generic chart component with new Chart API. Old chart components are still supported but will be removed in a future release.
ToolbarGroup deprecated, use left and right facets of toolbar instead. (Reverted back as of 5.0.1, both facets and toolbar groups will be supported instead)
Defining fields in sortBy-filterBy attributes is deprecated use a value expression instead.e.g.
sortBy="#{user.name}
" instead of sortBy="name"DataTable frozen rows feature take an integer value instead of a collection from now on. This value defined how many rows from the start should be frozen.
LazyDataModel's filters parameter changed to Map instead of Map as a requirement of the new Advanced
Filtering Feature.Dialog: appendToBody was removed in favor of
appendTo="@(body)
" to gain more flexibilityWatermark: forElement was removed in favor of
for="@(yourSelector)"
.Widgets must be referenced via "PF". e.g.
PF('widgetVarName').show()
instead ofwidgetVarName.show();
DataTable layout changed to table-layout:fixed.
PrimeFaces Push is reimplemented, PushContext is deprecated, use EventBus instead along with the new Push API.
ScrollPanel is reimplemented, usage is backward compatible however UI is slightly different.
5.0 to 5.1
Support for literal texts in filterBy-sortBy expressions were deprecated in 5.0 and it is removed in 5.1. These attributes only work with value expression as in the past.
Deprecated chart components are removed.
Upvotes: 9
Reputation: 488
You can't directly migrate from 3.4 to 5.2. There are some steps given to migrate in MigrationGuide. Perhaps you could first migrate from 3.4 to 4.0 there are some components changes on DataTable, DateSelectEvent, etc. Then you could proceed with 4.0 to 5.0 migration which involves more changes in LazyDataModel's and some of componets. Please go thought link given for MigrationGuide above.
Upvotes: -1