Solucionado (ver solução)
Solucionado
(ver solução)
1
resposta

Data esta retornando null

Esta aparecendo o seguinte erro:

set 30, 2017 1:13:47 PM com.sun.faces.context.AjaxExceptionHandlerImpl handlePartialResponseError
GRAVE: javax.faces.component.UpdateModelException: javax.el.PropertyNotFoundException: /aluguel.xhtml @92,92 value="#{aluguelBean.aluguel.dataAluguel.time}": Target Unreachable, [dataAluguel] returned null
    at javax.faces.component.UIInput.updateModel(UIInput.java:866)
    at javax.faces.component.UIInput.processUpdates(UIInput.java:749)
    at javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1290)
    at javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1290)
    at org.primefaces.component.fieldset.Fieldset.processUpdates(Fieldset.java:224)
    at javax.faces.component.UIForm.processUpdates(UIForm.java:281)
    at javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1290)
    at org.primefaces.component.dialog.Dialog.processUpdates(Dialog.java:431)
    at javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1290)
    at javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1290)
    at javax.faces.component.UIViewRoot.processUpdates(UIViewRoot.java:1254)
    at com.sun.faces.lifecycle.UpdateModelValuesPhase.execute(UpdateModelValuesPhase.java:78)
    at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
    at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:198)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:646)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:475)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80)
    at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:624)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:498)
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:796)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1366)
    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:745)
Caused by: javax.el.PropertyNotFoundException: /aluguel.xhtml @92,92 value="#{aluguelBean.aluguel.dataAluguel.time}": Target Unreachable, [dataAluguel] returned null
    at com.sun.faces.facelets.el.TagValueExpression.setValue(TagValueExpression.java:133)
    at javax.faces.component.UIInput.updateModel(UIInput.java:832)
    ... 36 more
Caused by: javax.el.PropertyNotFoundException: Target Unreachable, [dataAluguel] returned null
    at org.apache.el.parser.AstValue.getTarget(AstValue.java:124)
    at org.apache.el.parser.AstValue.setValue(AstValue.java:196)
    at org.apache.el.ValueExpressionImpl.setValue(ValueExpressionImpl.java:257)
    at com.sun.faces.facelets.el.TagValueExpression.setValue(TagValueExpression.java:131)
    ... 37 more

Na minha classe esta assim:

@Temporal(TemporalType.DATE)
    private Calendar dataAluguel;

E no xhtml:

<h:outputText value="Data Aluguel:" />
            <p:inputMask value="#{aluguelBean.aluguel.dataAluguel.time}" mask="99/99/9999">
                <f:convertDateTime pattern="dd/MM/yyyy" timeZone="America/Sao_Paulo"/>
            </p:inputMask>
1 resposta
solução!

Ola João

Utilize

@Temporal(TemporalType.DATE)
    private Calendar dataAluguel = Calendar.getInstance();