This is the migration guide to latest milestone of PrimeFaces 3.0 (M4 as of now). Please see the showcase demos for the features/changes mentioned here.
General Changes
- Taglib namespaces are changed as;
Note that this change applies 3.0.M4 and newer.
- Component events are now decoupled and implemented as ajax behaviors to improve flexibility. Read more at here. Common *Listener and *Update attributes are now removed, an example is rating component;
2.x;
3.x;
User's guide and Taglib docs(IDE completion) will provide all the available events of a component.
- RequestContext now allows to execute javascript from backing beans (e.g. deciding to keep a dialog open or hide it), In 2.x this conditional javascript execution on callbacks like oncomplete are achieved via callback params, execute("script here") makes it very easy to implement the same compared to callback params. Note that callback params are still supported and will be in future as they are also used internally in PrimeFaces.
- Tag/Attribute docs are available again in facelet taglib to take advantage of quick documentation via IDE code completion.
- Aristo replaced Sam as the built-in theme, sam is available at theme gallery as a downloadable theme.
New Components
- FeedReader
- Log
- OrderList
- Ring
- ScrollPanel
- SelectBooleanCheckbox
- SelectManyCheckbox
- SelectOneListbox
- SelectOneMenu
- SelectOneRadio
- SelectManyMenu
- Sheet
- SummaryRow
- SubTable
- TimeLine
- TagCloud
Component Changes
AccordionPanel
- Reimplemented as a native PrimeFaces widget instead of using jQuery UI's accordion widget.
- fillSpace, autoHeight, event, collapsible and effect attributes are removed.
- Multiple selection of tabs are now supported so activeIndex is a string instead of an integer. Provide a comma seperated list of indexes to activate multiple tabs.
- onTabShow attribute is added as a client side callback to execute when a tab is shown. onTabChange is also available as a callback when a tab is clicked but not yet shown. Passed parameters to the callbacks are changed.
- Dynamic number of tabs are now support by providing a collection, use this feature instead of c:forEach and ui:repeat.
- AccordionPanel is a naming container so make sure to you are aware of how findComponent algorithm works when referencing components.
- Event listeners are reimplemented as ajax behaviors.
AutoComplete
- Reimplemented as a native PrimeFaces widget instead of using jQuery UI's autocomplete widget.
- Custom content support is available.
- panelStyle and panelStyleClass options are added to customize the overlay.
- New dropdown mode places a button next to the input element to display all the available suggestions.
- CSS selectors are changed to align with general theming architecture.
- Event listeners are reimplemented as ajax behaviors.
Calendar
- Added timePicker functionality.
- I18N has been externalized via PrimeFacesLocales, PrimeFaces does not provide the translations anymore.
- Event listeners are reimplemented as ajax behaviors.
Carousel
- Reimplemented as a native PrimeFaces widget instead of using YUI's carousel widget.
- Header and Footer support is added.
- CSS selectors are changed to align with general theming architecture.
Charts
- Reimplemented using jqPlot canvas based library instead of YUI's flash based charting library.
- <p:chartSeries /> support is dropped instead of ChartModel API.
- Added donut, ohlc, meter gauge, area and bubble charts.
- Built-in polling is dropped in favor of Poll component.
- Added built-in resizing, axis titles, text rotation, enhanced legend and other useful features.
- Event listeners are reimplemented as ajax behaviors.
ColorPicker
- Reimplemented with a jQuery plugin to drop YUI color picker.
- Value only accepts hex value as String.
- Added inline mode.
ConfirmDialog
- Reimplemented as a native PrimeFaces instead of using jQuery UI dialog.
ContextMenu
- Reimplemented as a native widget instead of wijmo.
- ContextMenu has special integration with datatable, tree and treeTable.
- Modality and Fade effect is always on.
- Can be updated directly with ajax.
DataTable
- Selection requires rowKeys compared to old problematic rowIndex approach. There is a new attribute called rowKey to define a row data identifier in your domain model, additionally SelectableDataModel is introduced to implement advanced and efficient selection.
- Each cell is wrapped in a div with class .ui-dt-c, column style and styleClass apply to this wrapper.
- DataTable has special integration with contextMenu.
- Notable new features are column resizing and subtable for advanced grouping.
- Lazy Loading has been greatly enhanced and showstopper bugs are fixed.
- Event listeners are reimplemented as ajax behaviors.
- New events are available to hook-in like page, sort and filter.
- page attribute removed.
Dashboard
- Event listeners are reimplemented as ajax behaviors.
GraphicImage
- More secure way to stream dynamic content is implemented under the hood.
DragDrop
- Event listeners are reimplemented as ajax behaviors.
Dialog
- Reimplemented as a native PrimeFaces instead of using jQuery UI dialog.
- Supports minimize and maximize.
- Dynamic mode allows lazy loading of content until displaying for the first time.
- Removed closeOnEscape option.
- Event listeners are reimplemented as ajax behaviors.
Divider
- Removed, use separator instead.
Fieldset
- Event listeners are reimplemented as ajax behaviors.
FileUpload
- Reimplemented using HTML5 widget instead of a flash based widget.
- Mode option allows to choose between simple and advanced uploader.
- Supports dragdrop from file system.
- Changes in how upload restrictions are defined (e.g. allowTypes).
Galleria
- Supports dynamic images via iteration.
GMap
- Event listeners are reimplemented as ajax behaviors.
- Support for circle and rectangles.
Growl
- Displayed messages are removed in case a new message is added. Previously new messages are appended to the list of messages causing confusion.
IdleMonitor
- Event listeners are reimplemented as ajax behaviors.
Inplace
- Event listeners are reimplemented as ajax behaviors.
Layout
- Reimplemented using a jQuery plugin.
- LayoutUnit names are changed (e.g. top -> north, left -> west)
- size option is used instead of width and height to define unit dimension.
- Support for nested layouts.
- Event listeners are reimplemented as ajax behaviors.
Media
- More secure way to stream dynamic content is implemented under the hood.
Menu
- Reimplemented as a native widget instead of using wijmo.
Menubar
- Reimplemented as a native widget instead of using wijmo.
- autosubmenudisplay removed for now, might be added again in a future release.
MenuButton
- Menu part reimplemented as a native widget instead of using wijmo.
Paginator
- Reimplemented as a native widget instead of using yui.
Panel
- Event listeners are reimplemented as ajax behaviors.
PickList
- Custom content support is available.
- Item visuals are improved.
RemoteCommand
- Dynamic parameters can be passed into corresponding JavaScript function like remoteCommandName({ name1: 'value1', name2: 'value2' });
Slider
- Event listeners are reimplemented as ajax behaviors.
Spinner
- Reimplemented as a native PrimeFaces widget instead of using a jQuery plugin.
- showOn option is removed.
Star Rating
- Event listeners are reimplemented as ajax behaviors.
TabView
- Reimplemented as a native PrimeFaces widget instead of using jQuery UI's tabs widget.
- event and collapsible attributes are removed.
- New effects are added
- Dynamic number of tabs are now support by providing a collection, use this feature instead of c:forEach and ui:repeat.
- TabView is a naming container so make sure to you are aware of how findComponent algorithm works when referencing components.
- Event listeners are reimplemented as ajax behaviors.
- Tabs can be closable.
- Tabs can be disabled.
- Passed parameters to the client side callbacks are changed.
ThemeSwitcher
- Reimplemented as a native PrimeFaces widget instead of using jQuery UI's themeswitcher widget.
- No need to require internet connection as themes are changed locally.
- Used as a selectOneMenu.
Tooltip
- Reimplemented as a native PrimeFaces widget instead of using a jQuery plugin.
- Fixes to positioning and overlay issues.
- Removed global tooltip and custom positioning.
- More show/hide effects added.
Tree
- Reimplemented as a native PrimeFaces widget instead of using YUI Tree widget.
- Supports custom content in treeNodes.
- Event listeners are reimplemented as ajax behaviors.
- DragDrop feature is added.
- Special contextMenu integration is available.
TreeTable
- Reimplemented as a native PrimeFaces widget instead of using jQuery plugin.
- Nodes are expanded/collapsed with ajax.
- Event listeners are available as ajax behaviors.
- Selection mode is added featuring single, multiple and instant selection.
- Scrollable(horizontal and/or vertical) display.
- Special contextMenu integration is available.
- Resizable Columns.
PrimeFaces Mobile
TouchFaces has been rebranded as PrimeFaces Mobile and rewritten using jQuery Mobile.
Labels:
None