将 java 个 Web 项目从 PrimeFaces 3.4 迁移到 PrimeFaces 5.2
To migrate java web project from PrimeFaces 3.4 to PrimeFaces 5.2
我对 PrimeFaces 的工作经验不多。我必须将 java 网络 PrimeFaces 项目从 3.4 迁移到 5.2。尽管我在整个互联网上进行了搜索,但没有适合我情况的适当解决方案。如果您遇到过此类问题或听说过此类问题,请告诉我或发送 link 给我。基本上我想要这样做的方式。我已经知道应该更改 组件。除了更换罐子还有什么办法吗?我已经尝试用 PrimeFaces 5.2 jar 替换 PrimeFaces 3.4。但它不允许我更换罐子。我也必须更改代码吗?请给我迁移步骤。
有 PrimeFaces 迁移指南。从 3.5 到 5.2 需要一步一步来。
这是适合您情况的完整迁移指南:
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 flexibility
Watermark: forElement was removed in favor of for="@(yourSelector)"
.
Widgets must be referenced via "PF". e.g. PF('widgetVarName').show()
instead of widgetVarName.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.
您不能直接从 3.4 迁移到 5.2。
MigrationGuide 中给出了一些迁移步骤。也许您可以先从 3.4 迁移到 4.0,DataTable、DateSelectEvent 等组件发生了一些变化。然后您可以继续从 4.0 迁移到 5.0,这涉及 LazyDataModel 和一些组件的更多变化。请考虑上面为 MigrationGuide 提供的 link。
我对 PrimeFaces 的工作经验不多。我必须将 java 网络 PrimeFaces 项目从 3.4 迁移到 5.2。尽管我在整个互联网上进行了搜索,但没有适合我情况的适当解决方案。如果您遇到过此类问题或听说过此类问题,请告诉我或发送 link 给我。基本上我想要这样做的方式。我已经知道应该更改 组件。除了更换罐子还有什么办法吗?我已经尝试用 PrimeFaces 5.2 jar 替换 PrimeFaces 3.4。但它不允许我更换罐子。我也必须更改代码吗?请给我迁移步骤。
有 PrimeFaces 迁移指南。从 3.5 到 5.2 需要一步一步来。
这是适合您情况的完整迁移指南:
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.
您不能直接从 3.4 迁移到 5.2。 MigrationGuide 中给出了一些迁移步骤。也许您可以先从 3.4 迁移到 4.0,DataTable、DateSelectEvent 等组件发生了一些变化。然后您可以继续从 4.0 迁移到 5.0,这涉及 LazyDataModel 和一些组件的更多变化。请考虑上面为 MigrationGuide 提供的 link。