PrimeFaces Ajax API

UI Components for JSF
Post Reply
User avatar
Oleg
Expert Member
Posts: 3805
Joined: 02 Oct 2009, 09:41
Location: Germany, Black Forest

30 Jan 2010, 19:24

Hi Cagatay,

I would like to aks about JavaScript Ajax API. Do you have a documentation of using this "native" built-in API or is it a black box for us? Here is the standard for JSF 2 http://java.sun.com/javaee/javaserverfa ... .ajax.html. But what is about if we want to use PrimeFaces Ajax in JavaScript or write own components based on PrimeFaces one? I know you have two PhaseListener's which check PrimeFaces specific calls. This is another reason to use your API and not one from JSF 2 standard (although standard API should cause no problems).

Off topic: I've saw you use YUI Compressor Maven PlugIn. We use it too (compress and aggregation). This PlugIn was updated some time ago. The groupId were renamed and there is a new version 0.9. http://alchim.sourceforge.net/yuicompre ... index.html.

Best regards.
Oleg.
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

01 Feb 2010, 02:37

Hi Oleg,

I'm writing the updated version of User's Guide nowadays, I'll add a section about PrimeFaces ajax API with examples.

Regarding YUI compressor plugin, yes I use it to compress js and css PrimeFaces contains at build time. I'll look into the new version.

Thanks for the feedback

User avatar
Oleg
Expert Member
Posts: 3805
Joined: 02 Oct 2009, 09:41
Location: Germany, Black Forest

01 Feb 2010, 11:25

Hello Cagatay,

Super, I'm curious about it. Thanks a lot for good news. Hopefully we can use PrimeFaces Ajax API in almost the same simple manner as standard API :-)

By the way, did you already think about various Factory implementations creating custom PartialViewContext (for PrimeFaces Ajax), FacesConfig (for RequestContext encapsulation), ResourceHandler (for PrimeFaces resource loading) etc.? Maybe you can get rid of PhaseListeners. I don't really like PhaseListeners because they are performed for each request. That was just a question of course. Thanks.

- Oleg.
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

01 Feb 2010, 17:52

I agree that exposing PrimeFaces Ajax API can help implementors to come up with their own PrimeFaces powered components.

I don't think we can remove phaselisteners in JSF 1.2/PrimeFaces 1.x but maybe for JSF 2.0/PrimeFaces 2.x. PhaseListeners are executed in each request but it has almost no performance effect as it's at most two if statements to process. Considering what other libraries do to our applications with ViewHandlers, StateManagers, Servlet Filters, Html Parsers and more, I think PrimeFaces does a good job at having almost no effect on performance.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 32 guests