2 Replies Latest reply on Jul 18, 2011 1:56 PM by yasser zairi

    [RESOLVED] Target Unreachable, identifier 'valeursMBean' resolved to null

    yasser zairi Newbie

      Hi,

      i'm a newbie to webapp developpment and i'm stuck to a crucial error.

      actually i got an ERROR when i start my page.

      this is the page i wanted to display:

      __________________________________________________________________________

      <ui:composition xmlns="http://www.w3.org/1999/xhtml"

            xmlns:ui="http://java.sun.com/jsf/facelets"

            xmlns:h="http://java.sun.com/jsf/html"

            xmlns:f="http://java.sun.com/jsf/core"

            xmlns:a4j="http://richfaces.org/a4j"

            xmlns:rich="http://richfaces.org/rich">

              <h:form>

                  <rich:spacer height="30" />

                  <rich:scrollableDataTable frozenColCount="1" height="400px"

                      width="700px" id="ValReftable" var="valmob"

                      value="#{valeursMBean.valeurefList}" sortMode="single" binding="#{valeursMBean.valeurTable}">

                      <rich:column id="make">

                          <f:facet name="header"><h:outputText styleClass="headerText" value="idvaleurRef" /></f:facet>

                          <h:outputText value="#{valmob.idValeurRef}" />

                      </rich:column>

                      <rich:column id="model">

                          <f:facet name="header"><h:outputText styleClass="headerText" value="CodeIsin" /></f:facet>

                          <h:outputText value="#{valmob.codeIsin}" />

                      </rich:column>

                      <rich:column id="price">

                          <f:facet name="header"><h:outputText styleClass="headerText" value="Categorie" /></f:facet>

                          <h:outputText value="#{valmob.categorie}" />

                      </rich:column>

                      <rich:column id="mileage">

                          <f:facet name="header"><h:outputText styleClass="headerText" value="Etat" /></f:facet>

                          <h:outputText value="#{valmob.etat}" />

                      </rich:column>

                      <rich:column width="200px" id="vin">

                          <f:facet name="header"><h:outputText styleClass="headerText" value="Denomination" /></f:facet>

                          <h:outputText value="#{valmob.denimination}" />

                      </rich:column>

                      <rich:column id="stock">

                          <f:facet name="header"><h:outputText styleClass="headerText" value="Date Echeance" /></f:facet>

                          <h:outputText value="#{valmob.dateEcheance}" />

                      </rich:column>

                  </rich:scrollableDataTable>

                  <rich:spacer height="20px"/>

                  <a4j:commandButton value="Save" reRender="table"

                      action="#{dataTableScrollerBean.takeSelection}"/>

          </h:form>

      </ui:composition>

      _______________________________________________________________________

      my Bean is :

       

      package cdvm.surv.web;

       

      import java.io.Serializable;

      import java.util.List;

       

      import javax.annotation.PostConstruct;

       

       

      import org.richfaces.component.html.HtmlScrollableDataTable;

      import org.springframework.beans.factory.annotation.Autowired;

      import org.springframework.context.annotation.Scope;

      import org.springframework.stereotype.Component;

       

      import cdvm.surv.model.ValeurRef;

      import cdvm.surv.service.ValeurRefService;

       

      @Component("valeurMBean")

      @Scope("session")

      public class ValeursMBean implements Serializable {

       

          @Autowired

          private transient ValeurRefService valeurefService;

          private transient HtmlScrollableDataTable valeurTable;

          private List<ValeurRef> valeurefList;

       

          @PostConstruct

          public void init(){

              valeurefList = valeurefService.find();

          }

       

          // Getter and Setter

          public HtmlScrollableDataTable getValeurTable() {

              return valeurTable;

          }

          public void setValeurTable(HtmlScrollableDataTable valeurTable) {

              this.valeurTable = valeurTable;

          }

          public List<ValeurRef> getValeurefList() {

              return valeurefList;

          }

          public void setValeurefList(List<ValeurRef> valeurefList) {

              this.valeurefList = valeurefList;

          }

       

       

      }

       

      _______________________________________________________________________________

      and the ERROR i get is :

       

      javax.servlet.ServletException: /GestionRef/Grid.jsp @11,110 binding="#{valeursMBean.valeurTable}": Target Unreachable, identifier 'valeursMBean' resolved to null

      javax.faces.webapp.FacesServlet.service(FacesServlet.java:256)

      org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:206)

      org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)

      org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)

      org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)

      cause mère

      javax.el.PropertyNotFoundException: /GestionRef/Grid.jsp @11,110 binding="#{valeursMBean.valeurTable}": Target Unreachable, identifier 'valeursMBean' resolved to null
           com.sun.facelets.el.TagValueExpression.setValue(TagValueExpression.java:95)
           com.sun.faces.application.ApplicationImpl.createComponent(ApplicationImpl.java:213)
           com.sun.facelets.tag.jsf.ComponentHandler.createComponent(ComponentHandler.java:224)
           com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:139)
           com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
           com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:314)
           com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:169)
           com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
           com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:119)
           com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)
           com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:25)
           com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:248)
           com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:294)
           com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:273)
           com.sun.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:140)
           com.sun.facelets.tag.ui.IncludeHandler.apply(IncludeHandler.java:65)
           com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
           com.sun.facelets.tag.ui.DefineHandler.applyDefinition(DefineHandler.java:64)
           com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:131)
           com.sun.facelets.impl.DefaultFaceletContext$TemplateManager.apply(DefaultFaceletContext.java:337)
           com.sun.facelets.impl.DefaultFaceletContext.includeDefinition(DefaultFaceletContext.java:307)
           com.sun.facelets.tag.ui.InsertHandler.apply(InsertHandler.java:68)
           com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
           com.sun.facelets.tag.jsf.core.ViewHandler.apply(ViewHandler.java:109)
           com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
           com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)
           com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
           com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:25)
           com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:248)
           com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:294)
           com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:273)
           com.sun.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:140)
           com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:113)
           com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)
           com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:25)
           com.sun.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:95)
           com.sun.facelets.FaceletViewHandler.buildView(FaceletViewHandler.java:524)
           com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:567)
           org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)
           org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176)
           com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
           com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
           com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
           javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
           org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:206)
           org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
           org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)
           org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)

      any suggestions are welcomed
      Regards