0

(JSF、RichFaces、a4j フレームワークを使用して) アプリケーションにアクセスしようとすると、以下のエラーが発生します。

SEVERE: Error Rendering View[/index.xhtml]
javax.faces.FacesException: javax.faces.FacesException: javax.el.PropertyNotFoundException: /facelets/home.xhtml @448,82 rendered="#{contact.visible}": ELResolver cannot handle a null base Object with identifier 'contact'
at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:672)
at javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:680)
at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:678)
at javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:680)
at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:678)
at javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:680)
at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:678)
at javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:680)
at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:678)
at javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:680)
at org.ajax4jsf.component.AjaxViewRoot.encodeChildren(AjaxViewRoot.java:543)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:883)
at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:578)
at org.springframework.faces.webflow.FlowViewHandler.renderView(FlowViewHandler.java:99)
at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)
at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176)
at org.springframework.faces.webflow.FlowViewHandler.renderView(FlowViewHandler.java:99)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:108)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:266)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:159)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)

以下は「home.xhtml」ページの一部です

     <h:dataTable id="contactsTable"
 value="#{agentBean.personalDetails.contactList}"
      var="contact" border="0" width="90%">
     <h:column>
     <a4j:region id="ContactTypeRegion">
     <h:selectOneMenu id="contactType"
     value="#{contact.contactType}"
required="#{param['contactValidation'] != '0'}"
requiredMessage="#{user.ContactTypeRequired}">
<f:selectItems
value="#{contact.contactTypeList}" />
<a4j:support event="onchange"
focus="contactCode"
action="#{contact.enableContactNumber}"
reRender="ContactCodePanel,ContactNumPanel,EntensionPanel" />
</h:selectOneMenu>
</a4j:region>
<a4j:outputPanel id="ContactCodePanel">
<rich:spacer height="1" width="2" />
<h:inputText id="contactCode"
label="Contact Code"
value="#{contact.contactCountryCode}"
style="width:10%" class="txtBox"
required="#{param['contactValidation'] != '0'}"
requiredMessage="#{user.ContactCodeRequired}"
maxlength="3">
<f:validator
validatorId="NumericValidator" />
<f:validateLength minimum="3" maximum="3" />
<rich:toolTip for="ContactCodePanel"
value="Area Code" direction="bottom-left"
styleClass="tooltip" />
<rich:ajaxValidator event="onblur" />
</h:inputText>
                                        <rich:spacer height="1" width="2" />
<h:outputText value="-" />
</a4j:outputPanel>
<rich:spacer height="1" width="2" />

以下は、上記のエラーが発生するポイントです

<a4j:commandLink id="removeContact1"
value="#{contact.remove}"
rendered="#{contact.visible}"
reRender="contactsTable"
action="#{agentBean.personalDetails.removeContact}">
<a4j:actionparam name="contactValidation"
value="0" />
</a4j:commandLink>
</h:column>
</h:dataTable>
4

1 に答える 1

0

contactList ( datatableのagentBean.personalDetails.contactList から参照) に null エントリが含まれているようです

したがって、次の式は評価できません

rendered="#{contact.visible}"
于 2012-12-18T16:17:09.413 に答える