# Migration guide 13.0.0 -> 14.0.0

!> **Java 11 is now the minimum requirement!**

!> **JSF 2.0, 2.1 and 2.2 support is has been removed!**

!> OS settings for `prefers-reduced-motion: reduce` is now respected and PF disables all animations

## Deleted

  * JSF 2.0, 2.1 and 2.2 support has been removed (IMPORTANT: see SearchExpressions below)
  * `Watermark` in favor passthrough attribute `pt:placeholder` or vanilla JS
  * `HazelcastCacheProvider` has been removed from the JAR but the code can be found in the Cache documentation along with Caffeine
  * `org.primefaces.component.api.ImmutableSavedState` removed as it was no longer needed. If you still use it please copy the code from [here](https://github.com/primefaces/primefaces/blob/13.0.0/primefaces/src/main/java/org/primefaces/component/api/ImmutableSavedState.java)
  * `org.primefaces.expression.SearchExpressionFacade` removed in favor of `org.primefaces.expression.SearchExpressionUtils`

## Deprecated

  * Apache Commons FileUpload support has been deprecated for native uploading now that Servlet 3.0 is the minimum requirement. Please report any issues if native uploading does not work for your needs.
  * `InputSwitch` has been deprecated since 10.0 and will be removed in 15.0.0
  * All `<p:xxxChart>` (e.g bar, pie, line etc.) are deprecated in favor of new `<p:chart>` component and will be removed in 15.0.0

## Core

  * `primefaces.CLIENT_SIDE_LOCALISATION` is now enabled by default
  * OS settings for `prefers-reduced-motion: reduce` is now respected and PF disables all animations

## PrimeFaces Selenium Core

  * `javax.inject:javax.inject:1` is not a transitive dependency anymore

## SearchExpressions

  * In the past, PrimeFaces used shims to support JSF 2.2 and earlier versions for SearchExpressions. However, with PF 14.0.0 onwards only supporting JSF 2.3+, the handling of Search Expressions now delegates to the core Faces implementation. This shift may lead to errors with SearchExpressions that were functional in PF 13.0.0 but are now failing. It is important to update your SearchExpressions to conform to **valid** Faces 2.3+ expressions.
  * See https://github.com/primefaces/primefaces/issues/10435

## AutoComplete

  * `dropdownAriaLabel` moved to client side locale.js key `choose`
  * `emptyMessage` moved to client side locale.js key `emptySearchMessage`
  * `resultsMessage`  moved to client side locale.js key `searchMessage`

## Charts

  * A new more flexible version of Chart.js can be used `<p:chart>` allowing raw JSON or [XDEV Chart.js Java Model](https://github.com/xdev-software/chartjs-java-model)
  * `<p:barChart>` now uses `List<Object>` instead of `List<Number>`

## ColumnToggler

  *  AJAX `toggle` event is now `org.primefaces.event.ColumnToggleEvent` giving access to `UIColumn` that was toggled

## DatePicker/Calendar

  * Locale `firstDay` renamed `firstDayOfWeek` to match other Prime libraries

## DataTable

  * Using Column custom `sortFunction` signature change now requires a third parameter `SortMeta` like `public int sortByModel(Object car1, Object car2, SortMeta sortMeta)`
  * `JpaLazyDataModel` renamed to `JPALazyDataModel`, and initialization by constructors removed _(no backward compatibility)_, use `JPALazyDataModel.builder()` instead
  * `LazyDataModel#getRowData(rowIndex, sortBy, filterBy)` has been renamed `loadOne()` to load a single row
  * Added `cellNavigation` property which defaults to `true` to enable WCAG keyboard navigation of table cells.

### DataTable selection

Few selection attributes have been renamed for consistency purposes:
  * `rowSelectMode` renamed to `selectionRowMode`
  * `disabledSelection` renamed to `selectionDisabled`
  * `disabledTextSelection` renamed to `selectionTextDisabled`
  * `UIColumn#selectionMode` renamed to `selectionBox` and reworked. Since [13.0.0](https://github.com/primefaces/primefaces/issues/10129), `DataTable#selectionMode` is automatically deduced from `selection` value binding.

!> Starting from 14.0.0, `DataTable#selectionMode` will be the single source of truth to configure whether selection should be `single` or `multiple`. To configure selection column, e.g., display radiobutton or checkbox, `UIColumn#selectionBox` should be set to true. Whether it's a radiobutton or checkbox will depend on `DataTable#selectionMode`

## File Upload

  * `org.primefaces.model.file.UploadedFile` now required new overridden method `getWebkitRelativePath()` see: https://github.com/primefaces/primefaces/pull/10272
  * Apache Commons FileUpload deprecated
  * `invalidSizeMessage`, `invalidFileMessage`, `fileLimitMessage` are deprecated and will be removed in 15.0.0. PF i18n will be used for it.
  * `sizeLimit`, `fileLimit`, `allowTypes` are deprecated and will be removed in 15.0.0. Please attach `p:validateFile` to the `p:fileUpload` component.
  * FileUpload: Client side validation has been re-implemented with PrimeFaces CSV and support for `p:message(s)`/`p:growl`. Please make sure to enable CSV to use it.
  * FileUpload: onvalidationfailure also requires enabled CSV.
  * Simple FileUpload: filename is not displayed by default when `auto=true`, set `displayFilename=true` instead if you need it.
  * Explicitly add `<p:message>` element to print file validation errors. Use attribute `showDetails="true"` in case you want to print the detailed messages.
  * When using `dropZone`, you must now explicitly set `mode="advanced"` and `auto="true"` if needed, as these are no longer set automatically.

## MenuBar

  * `delay` has been renamed `showDelay` and new `hideDelay` property added

## Paginator

  * All ARIA labels moved from server `Messages.properties` to client `locale-xx.js`

## PickList

  * `addLabel, addAllLabel, removeLabel, removeAllLabel, moveUpLabel,  moveTopLabel, moveDownLabel,  moveBottomLabel` properties have been moved to client side locale, see https://github.com/primefaces/primefaces/pull/10418
  * `transfer` and `reorder` events now fire `change` events on the source and target inputs to make it consistent with other inputs
  * If you are using a POJO with a converter your POJO must implement `equals()` and `hashcode()` properly to ensure submission decode can correctly detect the POJO

## SelectOneRadio

  * `plain` attribute has been removed.

## SelectCheckBoxMenu

  * When using `f:selectItem` with `SelectCheckBoxMenu`, the `itemLabel` attribute is now required. Previously the component would use the `itemValue` as the label if not specified.

## TreeTable

  * Removal of `cloneOnFilter` property, when custom node is used, component will systematically clone node by using either 3 args constructor, copy constructor or `Cloneable#clone` method 

## Tooltip

  * Update default of `showDelay` property from 150ms to 400ms to match jQuery defaults. 
