0

i want to use a <p:ajax /> inside <p:inputText></<p:inputText> like this

<h:form prependId="false" id="date-form">
                                <p:inputText id="date" styleClass="form-control">
                                    <p:ajax listener="#{dashboardBean.dateChanged()}" event="change" />
                                </p:inputText>
                            </h:form>

When the user change the date from datePicker. the bean-method dateChanged has to be call. but the following error is thrown instead

SCHWERWIEGEND: Servlet.service() for servlet [Faces Servlet] in context with path [/MyApp] threw exception [null] with root cause
java.lang.NullPointerException
    at org.primefaces.util.ResourceUtils.getComponentResources(ResourceUtils.java:66)
    at org.primefaces.context.PrimePartialResponseWriter.startMetadataIfNecessary(PrimePartialResponseWriter.java:280)
    at org.primefaces.context.PrimePartialResponseWriter.startError(PrimePartialResponseWriter.java:107)
    at com.sun.faces.context.AjaxExceptionHandlerImpl.handlePartialResponseError(AjaxExceptionHandlerImpl.java:203)
    at com.sun.faces.context.AjaxExceptionHandlerImpl.handle(AjaxExceptionHandlerImpl.java:127)

Trying since 3 days why the exception is thrown, need help!!!

Am using Primefaces v6.0

Willy Tcha
  • 11
  • 5

0 Answers0