Primefaces Showcase missing library

UI Components for JSF
Post Reply
askNgrow
Posts: 3
Joined: 23 Jan 2019, 22:20

23 Jan 2019, 22:33

I'm trying to deploy Primefaces DatePicker example from the official site and I can't seem to find :"org.primefaces" / "org.primefaces.PrimeFaces" libraries.
I did check there is a RequestContext class but it seems of little help. However "org.primefaces.event.SelectEvent" was able to be recognized.
Here is my environment: Primefaces 5.3, JSF 2.2 on Netbeans 8.2. Below is the code snippet I was having error with:

Code: Select all

    public void click() {
        PrimeFaces.current().ajax().update("form:display");
        PrimeFaces.current().executeScript("PF('dlg').show()");
    }
Any help is much appreciated! Have a good one!
JSF 2.2 PrimeFaces 5.3 TomCat 8.0

tandraschko
PrimeFaces Core Developer
Posts: 3979
Joined: 03 Dec 2010, 14:11
Location: Bavaria, DE
Contact:

23 Jan 2019, 23:21

DatePicker and the whole showcase is PrimeFaces 6.2.x / 7.0.RC1.

RequestContext.getCurrentInstance() was the old similar API of PrimeFaces.current().
Thomas Andraschko

PrimeFaces | PrimeFaces Extensions

Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE

Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko

askNgrow
Posts: 3
Joined: 23 Jan 2019, 22:20

23 Jan 2019, 23:23

I found the archived PrimeFaces 5.3 source code and also found out about the Datepicker is newly released on version 6.2.14 in the forum.
Code snippet:

Code: Select all

        //PrimeFaces.current().ajax().update("form:display");
        RequestContext.getCurrentInstance().update("form:display");
        //PrimeFaces.current().executeScript("PF('dlg').show()");
        RequestContext.getCurrentInstance().execute("PF('dlg').show()");
This is what I found in the source code. The problem is fixed now. So I'm looking forward to tell others that a more powerful component has come and perhaps superior to the calendar component.
JSF 2.2 PrimeFaces 5.3 TomCat 8.0

askNgrow
Posts: 3
Joined: 23 Jan 2019, 22:20

23 Jan 2019, 23:24

tandraschko wrote:
23 Jan 2019, 23:21
DatePicker and the whole showcase is PrimeFaces 6.2.x / 7.0.RC1.

RequestContext.getCurrentInstance() was the old similar API of PrimeFaces.current().
Thanks a lot. It's very helpful.
JSF 2.2 PrimeFaces 5.3 TomCat 8.0

neliomesquita
Posts: 3
Joined: 28 Jan 2019, 19:36

23 Apr 2019, 18:59

askNgrow wrote:
23 Jan 2019, 23:24
tandraschko wrote:
23 Jan 2019, 23:21
DatePicker and the whole showcase is PrimeFaces 6.2.x / 7.0.RC1.

RequestContext.getCurrentInstance() was the old similar API of PrimeFaces.current().
So, if I'm using the old

Code: Select all

RequestContext.getCurrentInstance().reset()
, which one is the same in PF 7.0? Would be

Code: Select all

PrimeFacesContext.getCurrentInstance().release()
?

Thanks a lot!
PF 3.5
JSF 2.1.6

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 23 guests