2 Replies Latest reply on Jun 10, 2010 5:43 AM by theanswer

    Property not found

    theanswer

      <!doctype html public "-//w3c//dtd html 4.0 transitional//en">
      <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
      <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
      <!-- RichFaces tag library declaration -->
      <%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
      <%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>



      <html>

            <head>
          <style type="text/css">
              .col1 { vertical-align:top; }
              .col2 { vertical-align:top; width:450px; }
              .wizard { width:400px; }
              .wform td { vertical-align:top; }
              .wfcol1 { text-align: right; white-space:nowrap;}
              .wfcol2 { }
              .wfcol3 { }
              .s1row td { height:30px; }
              .rich-message { color:red;  }
             
              .navPanel {
                  position:absolute;
                  bottom:0;
                  height:23px;
                  margin:0;
                  padding:2px;
              }

          </style>
                  <title>RichFaces Greeter</title>

            </head>

         

                  <f:view>
      <a4j:form>
      <rich:dataTable value="#{events.Events}" var="cap" rows="10">

           <rich:column>

                <f:facet name="header">Name</f:facet>

                <h:outputText value="#{cap.name}"/>

           </rich:column>



      </rich:dataTable>
          

                        
          
             
      </a4j:form>
      </f:view>
      </html>

       

       

       

      package com.fp.Event.view.backing;
      
      import java.util.ArrayList;
      import java.util.List;
      
      import com.fp.Event.model.bo.Events;
      import com.fp.common.view.bean.BaseBean;
      
      public class EventBB  extends BaseBean {
           List<Events> Events = new ArrayList<Events>();
           String name="d";
           public void init()
           {
               System.out.println("sa");
               name="sa";
               Events = this.serviceLocator.getEventsService().getEvents();
               System.out.println(Events.get(0).getName());
           }
      
              public String getName() {
              return name;
          }
      
          public void setName(String name) {
              this.name = name;
          }
      
              public void setEvents(List<Events> events) {
                  this.Events = events;
              }
              
              public List<Events> getEvents()
              {
                  return Events;
              }
      }
      

       

       

      In faces-config.xml its like this

       

      <managed-bean>
              <managed-bean-name>events</managed-bean-name>
              <managed-bean-class>
                  com.fp.Event.view.backing.EventBB
              </managed-bean-class>
              <managed-bean-scope>session</managed-bean-scope>
              <managed-property>
                  <property-name>serviceLocator</property-name>
                  <value>#{serviceLocatorBean}</value>
              </managed-property>
          </managed-bean>

       

       

       

      I get error, javax.servlet.ServletException: /Events.jsp(41,0) '#{events.Events}' The class 'com.fp.Event.view.backing.EventBB' does not have the property 'Events'.