Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JSF and PrimeFaces Strategy

What is or could be a best practice?

  1. Using standard JSF components and combine them by PrimeFaces components when needed (for example when DHTML or AJAX components are needed)
  2. Forget all JSF Components and try to use all PrimeFaces components as much as possible

Please explain it and tell me about your experiences.

Thanks in advance...

like image 612
ehsun7b Avatar asked Dec 02 '22 02:12

ehsun7b


1 Answers

PrimeFaces is your AJAX framework, so if you need to send ajaxical request, then use PrimeFaces components.

Even though, you dont need to send ajax request, but you can still use PF component, if u need to provide a consistency look for your web page. For example, h:commandButton and p:commandButton. Use p:commandButton if u need to send ajax request, but u can also do this

<p:commandButton ajax="false" action="Your Action here"/>

This will provide the same result as:

<h:commandButton action="Your Action here"/>

but this way, you can provide the same consistent look for your button throughout the page.

PrimeFaces does not have replacements for h:panelGrid, h:panelGroup, h:inputText, h:outputText ...

like image 144
Thang Pham Avatar answered Dec 19 '22 14:12

Thang Pham