Primeface mini Cookbook
This cookbook was extracted data from here: https://www.primefaces.org/docs/guide/primefaces_user_guide_6_0.pdf
AjaxCore
-
Listener
```xml
- ### [PartialSubmit](https://www.primefaces.org/showcase/ui/ajax/partialSubmit.xhtml)
```xml
<p:inputText id="name" />
<p:commandButton value="False" partialSubmit="false" process="name" />
<p:commandButton value="True" partialSubmit="true" process="name" />
-
Counter
```xml
- [Process](https://www.primefaces.org/showcase/ui/ajax/process.xhtml)
```xml
<h:form>
<h:panelGrid id="grid" cellpadding="5" columns="2" style="margin-bottom:10px">
<f:facet name="header">
<p:messages id="msgs" />
</f:facet>
<p:outputLabel for="firstname" value="Firstname:" />
<p:inputText id="firstname" value="#{userView.firstname}" />
<p:outputLabel for="surname" value="Surname:" />
<p:inputText id="surname" value="#{userView.lastname}" required="true" requiredMessage="Surname is required." />
</h:panelGrid>
<h:panelGrid columns="6" cellpadding="5">
<p:commandButton value="All" process="@all" update="grid" action="#{userView.save}" />
<p:commandButton value="Form" process="@form" update="grid" action="#{userView.save}" />
<p:commandButton value="This" process="@this" update="grid" action="#{userView.save}" />
<p:commandButton value="None" process="@none" update="grid" action="#{userView.save}" />
<p:commandButton value="Parent" process="@parent" update="grid" action="#{userView.save}" />
<p:commandButton value="This Surname" process="@this,surname" update="grid" action="#{userView.save}" />
</h:panelGrid>
</h:form>
Selector | Type | Description |
---|---|---|
@this | Standard | Current component. |
@all | Standard | Whole view. |
@form | Standard | Closest ancestor form of current component. |
@none | Standard | No component . |
@namingcontainer | PrimeFaces | Closest ancestor naming container of current component. |
@parent | PrimeFaces | Parent of the current component. |
@composite | PrimeFaces | Closest composite component ancestor. |
@child(n) | PrimeFaces | nth child. |
@row(n) | PrimeFaces | nth row. |
@previous | PrimeFaces | Previous sibling. |
@next | PrimeFaces | Next sibling. |
@widgetVar(name) | PrimeFaces | Component with given widgetVar. |
@root | PrimeFaces | to start searching from the root instead the current component. |
@id | PrimeFaces | Used to search components by their id ignoring the component tree structure and naming containers. |
Multiple keywords | Primefaces | can be combined in a single expression using colon; for example: @form:@parent @composite:mybuttonid @this:@parent:@parent @form:@child(2) |
Primefaces jQuery Selector | Description |
---|---|
update=”@(form)” | Update all forms |
update=”@(form:first)” | Update first form |
update=”@(.mystyle)” | Update all components that has styleClass named mystyle |
update=”@(:input)” process=”@(:input)” | Update and process all inputs |
update=”@(.ui-datatable)” | Update all datatables |
process=”@(.ui-panel :input)” update=”@(.ui-panel)” | Process input components inside any panel and update all panels |
process=”@(:input:not(select))” | Process input components but not select components |
update=”@(:input:disabled)” | Update input components that are disabled |
update=”compId :form:compId @(:input) @parent:@child(2)” | PFS can be used with other referencing approaches as well; |
Input
- InputTextArea
- SelectBooleanButton
- SelectBooleanCheckbox
- SelectOneButton
- SelectOneRadio
- SelectCheckboxMenu
- SelectOneMenu
- TriStateCheckbox
- InputGroup
- InputNumber
- InputMask
- SelectOneListbox
- SelectManyButton
- SelectManyMenu
- SelectManyCheckbox
- MultiSelectListBox
- ToggleSwitch
- DatePicker
- Signature
- Spinner
- Slider
- InputText
- InputSwitch
- Password
- Keyboard
- Rating
- ColorPicker
- Inplace
- KeyFilter
- Knob
- TextEditor
- Chips
Button
Data
- Carousel
- DataGrid
- DataList
- DataView
- DataScroller
- DataTable
- HorizontalTree
- OrderList
- Organigram
- DataExporter
- Mindmap
- Diagram
- PickList
- Repeat
- Ring
- Schedule
- TagCloud
- Tree
- TreeTable
- Timeline
Panel
- Accordion
- Dashboard
- Fieldset
- Grid CSS
- Layout
- NotificationBar
- OutputPanel
- Panel
- PanelGrid
- Ribbon
- ScrollPanel
- TabView
- Toolbar
- Wizard
Overlay
Menu
- Breadcrumb
- ContextMenu
- Dock
- MegaMenu
- Menu
- Menubar
- PanelMenu
- SlideMenu
- Stack
- Steps
- TabMenu
- TieredMenu
Charts
- Area
- Bar
- Bubble
- Donut
- Line
- Pie
- MeterGauge
- OHLC
- Export
- Interactive
- Live
- Static
- Zoom
- Combined
- MultiAxis
- Date
- Responsive
ChartJs
Messages
Multimedia
File
DragDrop
Dialog Framework
Misc
- Responsive
- AutoUpdate
- ThemeSwitcher
- OutputLabel
- BlockUI
- Cache
- Captcha
- Clock
- Collector
- DefaultCommand
- Effect
- ExceptionHandler
- FeedReader
- IdleMonitor
- ImportConstants
- PrimeIcons
- FontAwesome
- Lifecycle
- Log
- Focus
- Hotkey
- Printer
- ProgressBar
- Context
- ResetInput
- Resizable
- Separator
- Spacer
- Spotlight
- Sticky
- Terminal
- Watermark