4 Replies Latest reply on Mar 10, 2010 8:22 AM by ajaykadiyala

    <h:outputText value="#{simItems.simType}" /> getting empty inside of <rich:extendedDataTable>

      I am getting empty values in which is property enum of VO using inside of <rich:extendedDataTable>.Could you please suggested the solution get the value .

       


      1) DATABase table structure.

      Field                           Type
      sim_type                      enum(PERSONAL,BUSINESS)

      2)Sim.xthml

      <rich:extendedDataTable rows="15" value="#{simBean.simDataModel}"
          var="simItems" blabala.........>

      <rich:column label="#{msg.simType}" sortBy="" filterBy=""
           filterEvent="onkeyup" width="90px">
           <f:facet name="header">
            <h:outputText value="#{msg.simType}" />
           </f:facet>
           <h:outputText value="#{simItems.simType}" />
           //Here i am getting empty,please suggest how to the values correctly,Since I was tested in Junit
           //DB level it working fine.
           //SIMVO simInfo=db.getAllSimInfo();
           //Iterator<SIMVO> itr = simInfo.iterator();
           //while(..)
           //  {
           //  sim=itr.next();
           //  log.debug("---------Sim type-------'+sim.getSimType());
           //  //able to print consol, this is not possbile in usein <h:outputtext vakue..
           //}

          </rich:column>
      </rich:extendedDataTable>
      3)SimBean.java
      public class SimBean {
      private List<SIMVO> sims;
      public AssetsBean() {
        sims = LoadAllSims();
      }

      private ExtendedTableDataModel dataModel;
      public ExtendedTableDataModel<SIMVO> getSimDataModel()
      {

         public SIMVO getItemByKey(Object key) {
            for (SIMVO c : sims) {
             if (key.equals(getKey(c))) {
              return c;
             }
            }
            return null;

           }
        blalabalalala........

         return dataModel;
      }

      public List<SIMVO> getSims() {

      return sims;

      }

       


      public void setSims(List<SIMVO> sims) {

      this.sims = sims;

      }

       

      }//end of the

      4)SIMVO.java
      public class SIMVO {

      private String simId;
      private String simName;

        private SIMType simType;

      public String getSimId() {
        return simId;
      }

      public void setSimId(String simId) {
        this.simId = simId;
      }

      public String getSimName() {
        return simName;
      }

        public void setSimName(String simName) {
        this.simName = simName;
      }

      public SIMType getSimType() {
        return simType;
      }

        public void setSimType(SIMType simType) {
        this.simType = simType;
      }


      }

      5) SIMType.java


      public enum SIMType
      {
        PERSONAL,
        BUSINESS;
      }