1 Reply Latest reply on May 28, 2008 3:37 AM by ilya_shaikovsky

    error: binding="#{customerAction.outputPanel}": javax.ejb.EJ

    bibou

      Hi every body,

      I have a problem since few days and I need someone to help me.

      I have implemented a .xhtml file that contains an outpuPanel and a HtmlPanelMenu. the outputPanel is binded to a htmlA4joutpuPanel property in my backingBean.

      when I execute the application, I got no error, But when I click to one panelMenuItem, which update it with the action attribute, I got an error coming from the binding attribute of the outpuPanel tag (see error below). the methods in my backingBean works well I have test them.
      I have deleted what updateOutputputPanel() contains and the error still the same.
      here is the .xhtml page

      <h:form id="customerForm">
      
       <h:panelGrid columns="2" columnClasses="cols" width="100%" border="1" cellspacing="0">
      
       <rich:panelMenu style="width:200px" mode="server"
       iconExpandedGroup="disc" iconCollapsedGroup="disc"
       iconExpandedTopGroup="chevronUp" iconGroupTopPosition="right"
       iconCollapsedTopGroup="chevronDown" iconCollapsedTopPosition="right" >
       <rich:panelMenuGroup label="Products">
      
       <c:forEach items="#{customerAction.searchOrderLine()}" var="prod" varStatus="s">
      <!-- le panelMenuitem updatele outputPanel par la fonction upadateOutputPanel() et fait un listener qui marche bien-->
       <rich:panelMenuItem label="#{prod.name}" actionListener="#{customerAction.searchServiceProduct}"
      action="#{customerAction.updateOutputPanel()}">
      
       <f:param id="id#{s.index}" name="productId" value="#{prod.productId}"/>
       </rich:panelMenuItem>
       </c:forEach>
      
       </rich:panelMenuGroup>
       </rich:panelMenu>
      
       <a4j:outputPanel id="outputPanel" rendered="true" binding= "#{customerAction.outputPanel}">
       </a4j:outputPanel>
      
       </h:panelGrid>
       </h:form>
      

      and here is my backing bean
      @Stateful
      @Scope(ScopeType.SESSION)
      @Name("customerAction")
      public class CustomerActionBean implements CustomerActionLocal {
      private HtmlAjaxOutputPanel outputPanel = new HtmlAjaxOutputPanel();
      
      public void updateOutputPanel() {
      
       HtmlDataTable dataTable = new HtmlDataTable();
      
       HtmlColumn columnName, columnAmount;
      
       dataTable.setValue("#{characteristicServiceProduct}");
       dataTable.setVar("chSePr");
      
       columnName = new HtmlColumn();
       HtmlOutputText outputTextName = new HtmlOutputText();
       outputTextName.setValue("#{chSePr.characteristic.name}");
       log.info("name =#0",outputTextName.getValue() );
       columnName.getChildren().add(outputTextName);
      
       columnAmount = new HtmlColumn();
       HtmlOutputText outputTextAmount = new HtmlOutputText();
       outputTextAmount.setValue("#{chSePr.amount}");
       log.info("amount =#0",outputTextAmount.getValue() );
       columnAmount.getChildren().add(outputTextAmount);
      
       dataTable.getChildren().add(columnName);
       dataTable.getChildren().add(columnAmount);
       getOutputPanel().getChildren().add(dataTable);
       getOutputPanel().setRendered(false);
       outputPanel.saveState(FacesContext.getCurrentInstance());
      
       }

      the error is as follow
      javax.ejb.EJBException
       at com.sun.ejb.containers.BaseContainer.processSystemException(BaseContainer.java:3869)
       at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:3769)
       at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:3571)
      .....
      Caused by: org.jboss.seam.RequiredException: @In attribute requires non-null value: customerAction.em
       at org.jboss.seam.Component.getValueToInject(Component.java:2168)
       at org.jboss.seam.Component.injectAttributes(Component.java:1598)
       at org.jboss.seam.Component.inject(Component.java:1416)
      
      javax.el.ELException: /pages/users/Customer.xhtml @69,116 binding="#{customerAction.outputPanel}": javax.ejb.EJBException
      at com.sun.facelets.el.TagValueExpression.setValue(TagValueExpression.java:101)
      ....
      Caused by: javax.ejb.EJBException
       at com.sun.ejb.containers.BaseContainer.processSystemException(BaseContainer.java:3869)
       at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:3769)
      


      thanks a lot
      regards
      bibou