Google News
logo
Java PrimeFaces Interview Questions
It is a UI (User Interface) library for JSF (JavaServer Faces) based applications. It is designed and developed by PrimeTek. It is a Cross-platform, open source and written in Java programing language.
PrimeFaces is full of features are listed below :

* Rich UI Components
* Ajax Support
* Push Support
* Dialog Suppport
* Client Side Validation
* Mobile UI kit
* Skinning Framework

Rich UI Components : It provides over 100 UI (User Interface) components. We can use that to create interective interface for JSF application. It includes HtmlEditor, Dialog, AutoComplete, Signature etc.
 
Ajax Support : Primefaces provides built-in Ajax support. We can use it to perform Ajax call for the JSF application. It provides Ajax components like: counter, listener, event, poll etc.
 
PrimeFaces Ajax Javascript API is powered by jQuery and optimized for JSF. Whole API consists of properly namespaced simple javascript functions PrimeFaces.ajax.Request, PrimeFaces.ajax.Response.
 
Push Support : It provides Atmosphere framework that provides us push support. The Atmosphere Framework is the most popular asynchronous application development framework for enterprise Java. PrimeFaces Push 2.0 is based on Atmosphere as its predecessor and follows an annotation based approach this time.
 
Dialog Support : PrimeFaces provides Dialog Framework which is used to open an external xhtml page in a dialog that is generated dynamically on runtime. The RequestContext provides methods to open and close dialog.
 
Client Side Validation : PrimeFaces provides the most advanced Client Side Validation for JavaServer Faces and Java EE. It is used to validate data at client side. It is compatible with Server Side Implementation and provides Advanced Bean Validation Integration.
 
Mobile UI Kit : It provides a mobile UI kit to create JSF application for mobile phones. It is default in the library. So, does not require any additional downloading. It is built on top of jQuery Mobile.
 
It includes various features popular PrimeFaces components, ajax framework extensions, mobile ajax behavior events, integrated navigation model, lazy loading of pages, responsive widgets etc.
 
Skining Framework : It provides lots of built-in themes and designer tools for visual themes. PrimeFaces is integrated with powerful ThemeRoller CSS Framework. Currently there are many pre-designed themes that we can preview and download from PrimeFaces theme gallery.
To configure primefaces in our JSF application, we need to download only one JAR file primefaces-{version}.jar. We can manually download it from the official site of primfaces.
Primefaces provides built-in Ajax support. It provides various attributes like update, event, listener etc. Here, we are creating an example that explains ajax attributes.
PrimeFaces provides <p:inputTextarea> component to create a text area in JSF application. It is an extension of standard inputTextarea. It includes various features like: autoComplete, autoResize etc.
The is used to create <p:selectBooleanButton> in JSF application. We can use it to get boolean input from the user. It provides a toggle button to interact with user.
PrimeFaces provides <p:selectBooleanCheckbox> component to create boolean checkbox. It is used to get a boolean value from the user. It is an extended version of the standard checkbox with theme integration.
It is an input component which is used to select a date. The <p:calendar> component is used to create a calendar in JSF application. It includes various features like display modes, paging, localization, ajax selection, etc.
It is an input component that provides live suggestions while an input is being typed.
 
Suggestions are loaded by calling a server-side completeMethod that takes a single string parameter.
It is used to choose multiple items displayed in an overlay. We can create it by using <p:selectCheckboxMenu>  component. It displays options in an overlay.
PrimeFaces provides <p:editor> component which is used to create an editor in JSF application. We can use this editor to get user input in large amount. This editor provides editing and formatting tools that we can use to format our input.
It is an extension to the standard inputText with skinning capabilities. We can create it by using the <p:inputText> component. It is used to get the user input in JSF application.
It is a special type of input box which forces the user to enter formatted input. We can create it by using <p:inputMask> component. It takes input in a certain pattern. It is useful when we want formatted user input.
It is an extended version of the standard selectOneListbox component. It is used to select one value from the list. PrimeFaces provides <p:selectOneListbox> component to create list box. It is useful when we want to get a user choice from the multiple options.
It is a multi-select component using the button user interface. The <p:selectManyButton> component is used to create multiple buttons. It is used to get user input by using buttons.
It is used to select multiple values from given options. It is useful when we want to take multiple user inputs from a collection. We can use <p:selectManyCheckbox> component to create SelectManyCheckbox in JSF application.
It is used to select a single item from a list using buttons. It creates items list as a list of buttons. So, we can choose the item by clicking on the button. The <p:selectOneButton> component is used to create a list of buttons in the JSF application.
It is used to choose a single item from a list of options. It is an extended version with theme integration. The <p:selectOneRadio> component is used to create list of radio buttons. It is useful when we want a single input from the user.
It is used to draw a signature as an input. It provides a canvas where we can draw signature. It provides various options such as background color, foreground color, the thickness for customization. It can be used in touch-enabled devices. In JSF application, we can create it by using the <p:signature> component.
It is an input text which provides increment and decrement buttons. It is used to get the user input in an input text. We can create it by using <p:spinner> component in our JSF application.
It is a text input with the slider. It is used to get user input with the help of the slider. It allows us to increment and decrement input by using the slider. The <p:slider> component is used to create the slider input text.
It is used to take a boolean value as an input from the user. It is a button which toggles ON or OFF. We can create it by using <p:inputSwitch> component.
It is an input field which takes hidden value from the user. The <p:password> component is used to create a password field in JSF application. It also provides feedback while entering the password.
It is an input text box which displays the virtual keyboard to enter the data. It used to get the user input by using a pointer device. So, a user can enter input without having the keyboard. The <p:keyboard> component is used to create the virtual keyboard.
It is an input component which is used to get the numeric value. It is used to get the user input in a specified range. The PrimeFaces provides <p:knob> component which is used to create a graphical circle.
It is an input text box which is used to enter the multiple values. The <p:chips> component is used to create input text in the JSF application. It is useful when we want to take multiple values from the user by using a single component.
It is an extension to the standard h:button JSF component with advanced skinning features. It is used to send GET request on the web. The <p:button> component is used to create button in JSF application.
It is an extended version of standard h:commandButton of JSF. It includes ajax, partial processing and skinning features.
 
The <p:commandButton> component is used to create button in JSF application.
It is an extended version of JSF h:commandLink with Ajax, partial processing, and confirmation feature. It is used to create a link which redirects control to specified target.
 
The <p:commandLink> component is used to create a link in JSF application.
It is a button which displays a default command and additional ones in an overlay. It is used to provide multiple commands. The <p:splitButton> component is used to create splitButton in JSF application.
It is a container component which displays vertically stacked panels. It is used to display data in the accordion format. We can switch anytime from one item to another just by clicking on that item. It is useful when the user wants to see the single item at a time from the collection.
It is a grouping component and an extension of the HTML fieldset. It is a kind of container that has a legend and content. It is used to display categorized data.
 
PrimeFaces provides <p:fieldset> component which is used to create fieldset in JSF application.
It is a star-based rating system. It is used to take user input as a rating. It is useful when we want to get user feedback. It is mostly used to obtain product rating.
It is an input component with a color palette. It allows us to select and reselect color in the web application. We can use it in our JSF application to get color as user input.
It is an input text box which provides easy editing of value on the browser. It consists of two members, the display element is the first clickable label, and the inline element is the hidden content that is displayed when the display element is toggled.
It is a horizontal grouping component which is used to form a toolbar with commands and other content. PrimeFaces provides a <p:toolbar> component to create a toolbar in JSF application. It is useful to create the tool based web application.
It is a panel component which can overlay other elements on the page. It is used to create a pop-up that can be used to display other elements too. It provides two methods show() and hide() to manage visibility of the component.
It is an advanced version of JavaScript confirmation box. It includes various features like skinning, customization and avoiding pop up blockers. It is used to create a confirmation dialog box to get the user response.
It is a multipurpose fixed positioned panel. It is used to display the notification bar. By default, it displays at the top. We can set its position by specifying the position attribute. We can also set the effect of notification bar like fade or slide.
It is a highly customizable borderLayout model. It is easy to create complex layouts even if we are not familiar with web design. It consists of 5 different layout units which are top, left, center, right, and bottom. We can refer to that as east, west, north, south, and center.
It is a small pop-up box that displays the information on the event. It is used to display the message to the user when the user interacts with the component. It includes various features like custom effects, events and theme support.
It is a navigation component which is used to provide contextual information about page hierarchy. It shows navigation information and allows to redirect to any page by clicking on the navigation link. The <p:breadCrumb> component is used to create navigation in JSF application.
It is a horizontal navigation component which provides menus options. It is used to collect menus and display that in an organized row.
 
We can create menubar by using <p:menubar> component in JSF application.
This component is an indicator of the steps in a workflow. It indicates that at what step we are right now. It is used to show the current step in the multi-steps application.
 
The <p:steps> component is used to create steps indicator in the JSF application.
This component is an indicator of the steps in a workflow. It indicates that at what step we are right now. It is used to show the current step in the multi-step application.
 
The <p:steps> component is used to create steps indicator in the JSF application.
It is a customized and advanced version of a LineChart where series are filled. It is used to represent statistical data graphically. The <p:chart> is a generic component to create the chart in JSF application. We can set the type of chart to specify the type of chart.
It is a type of graph in which a circle is divided into sectors, and each sector represents some statistic. It is a way to represent statistical data graphically. The <p:chart> component is used to create chart.
It is a notification widget which is used to display FacesMessages. It is similar to the standard h:messages component of JSF. We can place growl to anywhere in our application's web page. The location of growl in JSF application does not matter.
It is an input component which is used to upload the file to the server. It allows us to upload the file from the browser to the server. It includes HTML5 features and has the nice user interface with a progress bar and other useful buttons.