After updating to v6.1 from 6.0 p:calendar does not submit selected value, throws throws NullPointerException

UI Components for JSF
Post Reply
nbs
Posts: 9
Joined: 19 Feb 2018, 14:44

18 Apr 2019, 13:16

Before the application page is displayed I have initialized some items and put them in conversationscope using current request context.

Code: Select all

public void initializeParams() {
        RequestContext context = RequestContextHolder.getRequestContext();
        Date listFromDate = null;
        Date listUptoDate = null;
        String searchParam = "";  

        context.getConversationScope().asMap().put("listFromDate", listFromDate );
        context.getConversationScope().asMap().put("listUptoDate", listUptoDate );
        context.getConversationScope().asMap().put("searchParam", searchParam);
        context.getConversationScope().asMap().put("selectedBudget", null);  
        context.getConversationScope().asMap().put("costcenter", null);
    }

Code: Select all

<p:calendar value="${listFromDate}" pattern="dd/MMM/yyyy" showOn="button" size="11" style="float: right" 
                                            autocomplete="false" showButtonPanel="true" navigator="true" disabled="${searchByid}" >
<p:autoComplete id="branchCombo" value="#{costcenter}"
                                                completeMethod="${costcenterController.completeActiveCenters}"
                                                var="cc" itemLabel="#{cc.description}"
                                                itemValue="#{cc}" converter="${costcenterConverter}" 
                                                dropdown="true" forceSelection="true" scrollHeight="100" disabled="${!globalUser}">
                                            
If I select a date on the calendar and submit the form I get bellow NullPointerException error, but if I submit the form without selecting the calendar (only autocomplete selected) I don't get any error
java.lang.NullPointerException
at org.springframework.webflow.expression.el.ScopeSearchingELResolver.getType(ScopeSearchingELResolver.java:79)
at javax.el.CompositeELResolver.getType(CompositeELResolver.java:327)
at com.sun.faces.el.DemuxCompositeELResolver._getType(DemuxCompositeELResolver.java:215)
at com.sun.faces.el.DemuxCompositeELResolver.getType(DemuxCompositeELResolver.java:242)
at com.sun.el.parser.AstIdentifier.getType(AstIdentifier.java:83)
at com.sun.el.ValueExpressionImpl.getType(ValueExpressionImpl.java:201)
at com.sun.faces.facelets.el.TagValueExpression.getType(TagValueExpression.java:98)
at org.primefaces.component.calendar.CalendarRenderer.getConvertedValue(CalendarRenderer.java:271)
at javax.faces.component.UIInput.getConvertedValue(UIInput.java:1045)
at javax.faces.component.UIInput.validate(UIInput.java:975)
at org.primefaces.component.calendar.Calendar.validate(Calendar.java:578)
at javax.faces.component.UIInput.executeValidate(UIInput.java:1248)
at javax.faces.component.UIInput.processValidators(UIInput.java:712)
Primefaces 6.1
Spring Webflow 2.4.7
California Theme
Last edited by nbs on 22 Apr 2019, 11:44, edited 1 time in total.

Melloware
Posts: 3717
Joined: 22 Apr 2013, 15:48

19 Apr 2019, 13:05

Can you try 6.2 instead of 6.1?
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1

nbs
Posts: 9
Joined: 19 Feb 2018, 14:44

22 Apr 2019, 12:09

It still behaves the same way with 6.2

nbs
Posts: 9
Joined: 19 Feb 2018, 14:44

11 Nov 2019, 07:42

Any updates on this?

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

11 Nov 2019, 12:16

try 7.0
also the NPE is from spring, try to debug yourself and find out what happens
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

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 50 guests