1 2 Previous Next 22 Replies Latest reply on Jun 9, 2009 7:59 AM by Ilya Shaikovsky

    Problems with rich:orderedList

    Kashif Nazar Newbie

      Hello,

      I am getting this exception error.

      sourceId=category_order_form:videosOrderingList[severity=(ERROR 2), summary=("Component category_order_form:videosOrderingList has invalid value expression eu.digitania.admingui.beans.Category@ca9a2d"), detail=("Component category_order_form:videosOrderingList has invalid value expression eu.digitania.admingui.beans.Category@ca9a2d")]


      This is how I am coding it

      <rich:orderingList id="videosOrderingList"
       value="#{categoryBean.videoCategories}" var="category" converter="categoryConverter" selection="#{categoryBean.selectedVideoCategories}">
       <rich:column>
       <h:outputText value="#{category.name}"></h:outputText>
       </rich:column>
      </rich:orderingList>


      where categoryBean.videoCategories is mapped to a List

      This is my converter

      public class CategoryConverter implements Converter
      {
      
       @Override
       public Object getAsObject(FacesContext context, UIComponent component, String name)
       {
       Category category = new Category();
       category.setName(name);
       return category;
       }
      
       @Override
       public String getAsString(FacesContext context, UIComponent component, Object object)
       {
       Category category = (Category) object;
       return category.getName();
       }
      
      }


      What might be the problem.

        • 1. Re: Problems with rich:orderedList
          Nick Belaevski Master

          Are equals and hashCode properly defined for Category class?

          • 2. Re: Problems with rich:orderedList
            Kashif Nazar Newbie

            No, what logic can I used for these two overloads. Any example?

            • 3. Re: Problems with rich:orderedList
              Ilya Shaikovsky Master

              richfaces-demo contains the code. checkout sources from svn to explore the case locally.

              • 5. Re: Problems with rich:orderedList
                Kashif Nazar Newbie

                I overrode the two functions like this.

                public boolean equals(Object object)
                 {
                 if (object instanceof Category)
                 {
                 Category category = (Category) object;
                 try
                 {
                 if (this.categoryId.equals(category.getCategoryId()))
                 {
                 return true;
                 }
                 }
                 catch (NullPointerException e)
                 {
                 e.printStackTrace();
                 }
                 }
                 return false;
                 }
                
                 public int hashCode()
                 {
                 if(this.getCategoryId()!=null)
                 {
                 return this.getCategoryId().hashCode();
                 }
                 return (int)(Math.random()+1*10000);
                 }
                


                but the problem is still there.

                • 6. Re: Problems with rich:orderedList
                  Nick Belaevski Master

                  Eclipse has equals/hashCode generation feature out of the box. Check if your IDE is equipped with one.

                  • 8. Re: Problems with rich:orderedList
                    Kashif Nazar Newbie

                    This time I generated the overrides using eclipse.

                    These are the functions

                    @Override
                     public int hashCode()
                     {
                     final int prime = 31;
                     int result = 1;
                     result = prime * result + ((categoryId == null) ? 0 : categoryId.hashCode());
                     result = prime * result + ((contenttypeId == null) ? 0 : contenttypeId.hashCode());
                     result = prime * result + ((name == null) ? 0 : name.hashCode());
                     result = prime * result + ((sequenceNumber == null) ? 0 : sequenceNumber.hashCode());
                     return result;
                     }
                    
                     @Override
                     public boolean equals(Object obj)
                     {
                     if (this == obj)
                     return true;
                     if (obj == null)
                     return false;
                     if (getClass() != obj.getClass())
                     return false;
                     Category other = (Category) obj;
                     if (categoryId == null)
                     {
                     if (other.categoryId != null)
                     return false;
                     }
                     else if (!categoryId.equals(other.categoryId))
                     return false;
                     if (contenttypeId == null)
                     {
                     if (other.contenttypeId != null)
                     return false;
                     }
                     else if (!contenttypeId.equals(other.contenttypeId))
                     return false;
                     if (name == null)
                     {
                     if (other.name != null)
                     return false;
                     }
                     else if (!name.equals(other.name))
                     return false;
                     if (sequenceNumber == null)
                     {
                     if (other.sequenceNumber != null)
                     return false;
                     }
                     else if (!sequenceNumber.equals(other.sequenceNumber))
                     return false;
                     return true;
                     }


                    But I still face this message
                    sourceId=category_order_form:videosOrderingList[severity=(ERROR 2), summary=("Component category_order_form:videosOrderingList has invalid value expression eu.digitania.admingui.beans.Category@3779bec0"), detail=("Component category_order_form:videosOrderingList has invalid value expression eu.digitania.admingui.beans.Category@3779bec0")]


                    • 9. Re: Problems with rich:orderedList
                      Nick Belaevski Master

                      Ok, post code for categoryBean please.

                      • 10. Re: Problems with rich:orderedList
                        Kashif Nazar Newbie

                        package eu.digitania.admingui.backingbeans;

                        import java.io.Serializable;
                        import java.sql.SQLException;
                        import java.util.List;

                        import eu.digitania.admingui.beans.Category;
                        import eu.digitania.admingui.dao.CategoryDAOImpl;
                        import eu.digitania.admingui.dao.MobileContentPortalDao;
                        import eu.digitania.admingui.domain.Constants;

                        public class CategoryBackingBean extends Category implements Serializable
                        {
                        /**
                        *
                        */
                        private static final long serialVersionUID = 205990671346396379L;


                        private List gamesCategories;
                        private List trueTonesCategories;
                        private List polyTonesCategories;
                        private List videoCategories;
                        private List backgroundCategories;

                        private List selectedGamesCategories;
                        private List selectedTrueTonesCategories;
                        private List selectedPolyTonesCategories;
                        private List selectedVideoCategories;
                        private List selectedBackgroundCategories;



                        public void setVideoCategories(List videoCategories)
                        {
                        this.videoCategories = videoCategories;
                        }


                        public void setBackgroundCategories(List backgroundCategories)
                        {
                        this.backgroundCategories = backgroundCategories;
                        }

                        public void setGamesCategories(List gamesCategories)
                        {
                        this.gamesCategories = gamesCategories;
                        }

                        public void setTrueTonesCategories(List trueTonesCategories)
                        {
                        this.trueTonesCategories = trueTonesCategories;
                        }

                        public void setPolyTonesCategories(List polyTonesCategories)
                        {
                        this.polyTonesCategories = polyTonesCategories;
                        }


                        public List getGamesCategories()
                        {
                        CategoryDAOImpl categoryDAOImpl = new CategoryDAOImpl(MobileContentPortalDao.getSqlMapper());
                        try
                        {
                        gamesCategories = categoryDAOImpl.selectNonAdultCategoriesOrderedBySequenceNumber(Constants.MOBILE_GAME_CONTENT_TYPE);
                        }
                        catch (SQLException e)
                        {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                        }
                        return gamesCategories;
                        }

                        public List getTrueTonesCategories()
                        {
                        CategoryDAOImpl categoryDAOImpl = new CategoryDAOImpl(MobileContentPortalDao.getSqlMapper());
                        try
                        {
                        trueTonesCategories = categoryDAOImpl.selectNonAdultCategoriesOrderedBySequenceNumber(Constants.TRUE_TONE_CONTENT_TYPE);
                        }
                        catch (SQLException e)
                        {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                        }
                        return trueTonesCategories;
                        }

                        public List getPolyTonesCategories()
                        {
                        CategoryDAOImpl categoryDAOImpl = new CategoryDAOImpl(MobileContentPortalDao.getSqlMapper());
                        try
                        {
                        polyTonesCategories = categoryDAOImpl.selectNonAdultCategoriesOrderedBySequenceNumber(Constants.POLY_RINGTONE_CONTENT_TYPE);
                        }
                        catch (SQLException e)
                        {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                        }
                        return polyTonesCategories;
                        }

                        public List getVideoCategories()
                        {
                        CategoryDAOImpl categoryDAOImpl = new CategoryDAOImpl(MobileContentPortalDao.getSqlMapper());
                        try
                        {
                        videoCategories = categoryDAOImpl.selectNonAdultCategoriesOrderedBySequenceNumber(Constants.VIDEO_CONTENT_TYPE);
                        }
                        catch (SQLException e)
                        {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                        }
                        return videoCategories;
                        }

                        public List getBackgroundCategories()
                        {
                        CategoryDAOImpl categoryDAOImpl = new CategoryDAOImpl(MobileContentPortalDao.getSqlMapper());
                        try
                        {
                        backgroundCategories = categoryDAOImpl.selectNonAdultCategoriesOrderedBySequenceNumber(Constants.BACKGROUND_CONTENT_TYPE);
                        }
                        catch (SQLException e)
                        {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                        }
                        return backgroundCategories;
                        }


                        public List getSelectedGamesCategories()
                        {
                        return selectedGamesCategories;
                        }


                        public void setSelectedGamesCategories(List selectedGamesCategories)
                        {
                        this.selectedGamesCategories = selectedGamesCategories;
                        }


                        public List getSelectedTrueTonesCategories()
                        {
                        return selectedTrueTonesCategories;
                        }


                        public void setSelectedTrueTonesCategories(List selectedTrueTonesCategories)
                        {
                        this.selectedTrueTonesCategories = selectedTrueTonesCategories;
                        }


                        public List getSelectedPolyTonesCategories()
                        {
                        return selectedPolyTonesCategories;
                        }


                        public void setSelectedPolyTonesCategories(List selectedPolyTonesCategories)
                        {
                        this.selectedPolyTonesCategories = selectedPolyTonesCategories;
                        }


                        public List getSelectedVideoCategories()
                        {
                        return selectedVideoCategories;
                        }


                        public void setSelectedVideoCategories(List selectedVideoCategories)
                        {
                        this.selectedVideoCategories = selectedVideoCategories;
                        }


                        public List getSelectedBackgroundCategories()
                        {
                        return selectedBackgroundCategories;
                        }


                        public void setSelectedBackgroundCategories(List selectedBackgroundCategories)
                        {
                        this.selectedBackgroundCategories = selectedBackgroundCategories;
                        }


                        public String saveOrdering()
                        {


                        return "success";
                        }




                        }



                        package eu.digitania.admingui.beans;

                        public class Category
                        {
                        /**
                        * This field was generated by Apache iBATIS ibator. This field corresponds to the database column category.category_id
                        *
                        * @ibatorgenerated Fri Jun 05 10:55:52 BDT 2009
                        */
                        private Integer categoryId;

                        /**
                        * This field was generated by Apache iBATIS ibator. This field corresponds to the database column category.contenttype_id
                        *
                        * @ibatorgenerated Fri Jun 05 10:55:52 BDT 2009
                        */
                        private Integer contenttypeId;

                        /**
                        * This field was generated by Apache iBATIS ibator. This field corresponds to the database column category.name
                        *
                        * @ibatorgenerated Fri Jun 05 10:55:52 BDT 2009
                        */
                        private String name;

                        /**
                        * This field was generated by Apache iBATIS ibator. This field corresponds to the database column category.sequence_number
                        *
                        * @ibatorgenerated Fri Jun 05 10:55:52 BDT 2009
                        */
                        private Integer sequenceNumber;

                        /**
                        * This method was generated by Apache iBATIS ibator. This method returns the value of the database column category.category_id
                        *
                        * @return the value of category.category_id
                        *
                        * @ibatorgenerated Fri Jun 05 10:55:52 BDT 2009
                        */
                        public Integer getCategoryId()
                        {
                        return categoryId;
                        }

                        /**
                        * This method was generated by Apache iBATIS ibator. This method sets the value of the database column category.category_id
                        *
                        * @param categoryId
                        * the value for category.category_id
                        *
                        * @ibatorgenerated Fri Jun 05 10:55:52 BDT 2009
                        */
                        public void setCategoryId(Integer categoryId)
                        {
                        this.categoryId = categoryId;
                        }

                        /**
                        * This method was generated by Apache iBATIS ibator. This method returns the value of the database column category.contenttype_id
                        *
                        * @return the value of category.contenttype_id
                        *
                        * @ibatorgenerated Fri Jun 05 10:55:52 BDT 2009
                        */
                        public Integer getContenttypeId()
                        {
                        return contenttypeId;
                        }

                        /**
                        * This method was generated by Apache iBATIS ibator. This method sets the value of the database column category.contenttype_id
                        *
                        * @param contenttypeId
                        * the value for category.contenttype_id
                        *
                        * @ibatorgenerated Fri Jun 05 10:55:52 BDT 2009
                        */
                        public void setContenttypeId(Integer contenttypeId)
                        {
                        this.contenttypeId = contenttypeId;
                        }

                        /**
                        * This method was generated by Apache iBATIS ibator. This method returns the value of the database column category.name
                        *
                        * @return the value of category.name
                        *
                        * @ibatorgenerated Fri Jun 05 10:55:52 BDT 2009
                        */
                        public String getName()
                        {
                        return name;
                        }

                        /**
                        * This method was generated by Apache iBATIS ibator. This method sets the value of the database column category.name
                        *
                        * @param name
                        * the value for category.name
                        *
                        * @ibatorgenerated Fri Jun 05 10:55:52 BDT 2009
                        */
                        public void setName(String name)
                        {
                        this.name = name;
                        }

                        /**
                        * This method was generated by Apache iBATIS ibator. This method returns the value of the database column category.sequence_number
                        *
                        * @return the value of category.sequence_number
                        *
                        * @ibatorgenerated Fri Jun 05 10:55:52 BDT 2009
                        */
                        public Integer getSequenceNumber()
                        {
                        return sequenceNumber;
                        }

                        /**
                        * This method was generated by Apache iBATIS ibator. This method sets the value of the database column category.sequence_number
                        *
                        * @param sequenceNumber
                        * the value for category.sequence_number
                        *
                        * @ibatorgenerated Fri Jun 05 10:55:52 BDT 2009
                        */
                        public void setSequenceNumber(Integer sequenceNumber)
                        {
                        this.sequenceNumber = sequenceNumber;
                        }

                        @Override
                        public int hashCode()
                        {
                        final int prime = 31;
                        int result = 1;
                        result = prime * result + ((categoryId == null) ? 0 : categoryId.hashCode());
                        result = prime * result + ((contenttypeId == null) ? 0 : contenttypeId.hashCode());
                        result = prime * result + ((name == null) ? 0 : name.hashCode());
                        result = prime * result + ((sequenceNumber == null) ? 0 : sequenceNumber.hashCode());
                        return result;
                        }

                        @Override
                        public boolean equals(Object obj)
                        {
                        if (this == obj)
                        return true;
                        if (obj == null)
                        return false;
                        if (getClass() != obj.getClass())
                        return false;
                        Category other = (Category) obj;
                        if (categoryId == null)
                        {
                        if (other.categoryId != null)
                        return false;
                        }
                        else if (!categoryId.equals(other.categoryId))
                        return false;
                        if (contenttypeId == null)
                        {
                        if (other.contenttypeId != null)
                        return false;
                        }
                        else if (!contenttypeId.equals(other.contenttypeId))
                        return false;
                        if (name == null)
                        {
                        if (other.name != null)
                        return false;
                        }
                        else if (!name.equals(other.name))
                        return false;
                        if (sequenceNumber == null)
                        {
                        if (other.sequenceNumber != null)
                        return false;
                        }
                        else if (!sequenceNumber.equals(other.sequenceNumber))
                        return false;
                        return true;
                        }


                        }

                        • 11. Re: Problems with rich:orderedList
                          Kashif Nazar Newbie

                          package eu.digitania.admingui.backingbeans;

                          import java.io.Serializable;
                          import java.sql.SQLException;
                          import java.util.List;

                          import eu.digitania.admingui.beans.Category;
                          import eu.digitania.admingui.dao.CategoryDAOImpl;
                          import eu.digitania.admingui.dao.MobileContentPortalDao;
                          import eu.digitania.admingui.domain.Constants;

                          public class CategoryBackingBean extends Category implements Serializable
                          {
                          /**
                          *
                          */
                          private static final long serialVersionUID = 205990671346396379L;


                          private List gamesCategories;
                          private List trueTonesCategories;
                          private List polyTonesCategories;
                          private List videoCategories;
                          private List backgroundCategories;

                          private List selectedGamesCategories;
                          private List selectedTrueTonesCategories;
                          private List selectedPolyTonesCategories;
                          private List selectedVideoCategories;
                          private List selectedBackgroundCategories;



                          public void setVideoCategories(List videoCategories)
                          {
                          this.videoCategories = videoCategories;
                          }


                          public void setBackgroundCategories(List backgroundCategories)
                          {
                          this.backgroundCategories = backgroundCategories;
                          }

                          public void setGamesCategories(List gamesCategories)
                          {
                          this.gamesCategories = gamesCategories;
                          }

                          public void setTrueTonesCategories(List trueTonesCategories)
                          {
                          this.trueTonesCategories = trueTonesCategories;
                          }

                          public void setPolyTonesCategories(List polyTonesCategories)
                          {
                          this.polyTonesCategories = polyTonesCategories;
                          }


                          public List getGamesCategories()
                          {
                          CategoryDAOImpl categoryDAOImpl = new CategoryDAOImpl(MobileContentPortalDao.getSqlMapper());
                          try
                          {
                          gamesCategories = categoryDAOImpl.selectNonAdultCategoriesOrderedBySequenceNumber(Constants.MOBILE_GAME_CONTENT_TYPE);
                          }
                          catch (SQLException e)
                          {
                          // TODO Auto-generated catch block
                          e.printStackTrace();
                          }
                          return gamesCategories;
                          }

                          public List getTrueTonesCategories()
                          {
                          CategoryDAOImpl categoryDAOImpl = new CategoryDAOImpl(MobileContentPortalDao.getSqlMapper());
                          try
                          {
                          trueTonesCategories = categoryDAOImpl.selectNonAdultCategoriesOrderedBySequenceNumber(Constants.TRUE_TONE_CONTENT_TYPE);
                          }
                          catch (SQLException e)
                          {
                          // TODO Auto-generated catch block
                          e.printStackTrace();
                          }
                          return trueTonesCategories;
                          }

                          public List getPolyTonesCategories()
                          {
                          CategoryDAOImpl categoryDAOImpl = new CategoryDAOImpl(MobileContentPortalDao.getSqlMapper());
                          try
                          {
                          polyTonesCategories = categoryDAOImpl.selectNonAdultCategoriesOrderedBySequenceNumber(Constants.POLY_RINGTONE_CONTENT_TYPE);
                          }
                          catch (SQLException e)
                          {
                          // TODO Auto-generated catch block
                          e.printStackTrace();
                          }
                          return polyTonesCategories;
                          }

                          public List getVideoCategories()
                          {
                          CategoryDAOImpl categoryDAOImpl = new CategoryDAOImpl(MobileContentPortalDao.getSqlMapper());
                          try
                          {
                          videoCategories = categoryDAOImpl.selectNonAdultCategoriesOrderedBySequenceNumber(Constants.VIDEO_CONTENT_TYPE);
                          }
                          catch (SQLException e)
                          {
                          // TODO Auto-generated catch block
                          e.printStackTrace();
                          }
                          return videoCategories;
                          }

                          public List getBackgroundCategories()
                          {
                          CategoryDAOImpl categoryDAOImpl = new CategoryDAOImpl(MobileContentPortalDao.getSqlMapper());
                          try
                          {
                          backgroundCategories = categoryDAOImpl.selectNonAdultCategoriesOrderedBySequenceNumber(Constants.BACKGROUND_CONTENT_TYPE);
                          }
                          catch (SQLException e)
                          {
                          // TODO Auto-generated catch block
                          e.printStackTrace();
                          }
                          return backgroundCategories;
                          }


                          public List getSelectedGamesCategories()
                          {
                          return selectedGamesCategories;
                          }


                          public void setSelectedGamesCategories(List selectedGamesCategories)
                          {
                          this.selectedGamesCategories = selectedGamesCategories;
                          }


                          public List getSelectedTrueTonesCategories()
                          {
                          return selectedTrueTonesCategories;
                          }


                          public void setSelectedTrueTonesCategories(List selectedTrueTonesCategories)
                          {
                          this.selectedTrueTonesCategories = selectedTrueTonesCategories;
                          }


                          public List getSelectedPolyTonesCategories()
                          {
                          return selectedPolyTonesCategories;
                          }


                          public void setSelectedPolyTonesCategories(List selectedPolyTonesCategories)
                          {
                          this.selectedPolyTonesCategories = selectedPolyTonesCategories;
                          }


                          public List getSelectedVideoCategories()
                          {
                          return selectedVideoCategories;
                          }


                          public void setSelectedVideoCategories(List selectedVideoCategories)
                          {
                          this.selectedVideoCategories = selectedVideoCategories;
                          }


                          public List getSelectedBackgroundCategories()
                          {
                          return selectedBackgroundCategories;
                          }


                          public void setSelectedBackgroundCategories(List selectedBackgroundCategories)
                          {
                          this.selectedBackgroundCategories = selectedBackgroundCategories;
                          }


                          public String saveOrdering()
                          {


                          return "success";
                          }




                          }



                          package eu.digitania.admingui.beans;

                          public class Category
                          {
                          /**
                          * This field was generated by Apache iBATIS ibator. This field corresponds to the database column category.category_id
                          *
                          * @ibatorgenerated Fri Jun 05 10:55:52 BDT 2009
                          */
                          private Integer categoryId;

                          /**
                          * This field was generated by Apache iBATIS ibator. This field corresponds to the database column category.contenttype_id
                          *
                          * @ibatorgenerated Fri Jun 05 10:55:52 BDT 2009
                          */
                          private Integer contenttypeId;

                          /**
                          * This field was generated by Apache iBATIS ibator. This field corresponds to the database column category.name
                          *
                          * @ibatorgenerated Fri Jun 05 10:55:52 BDT 2009
                          */
                          private String name;

                          /**
                          * This field was generated by Apache iBATIS ibator. This field corresponds to the database column category.sequence_number
                          *
                          * @ibatorgenerated Fri Jun 05 10:55:52 BDT 2009
                          */
                          private Integer sequenceNumber;

                          /**
                          * This method was generated by Apache iBATIS ibator. This method returns the value of the database column category.category_id
                          *
                          * @return the value of category.category_id
                          *
                          * @ibatorgenerated Fri Jun 05 10:55:52 BDT 2009
                          */
                          public Integer getCategoryId()
                          {
                          return categoryId;
                          }

                          /**
                          * This method was generated by Apache iBATIS ibator. This method sets the value of the database column category.category_id
                          *
                          * @param categoryId
                          * the value for category.category_id
                          *
                          * @ibatorgenerated Fri Jun 05 10:55:52 BDT 2009
                          */
                          public void setCategoryId(Integer categoryId)
                          {
                          this.categoryId = categoryId;
                          }

                          /**
                          * This method was generated by Apache iBATIS ibator. This method returns the value of the database column category.contenttype_id
                          *
                          * @return the value of category.contenttype_id
                          *
                          * @ibatorgenerated Fri Jun 05 10:55:52 BDT 2009
                          */
                          public Integer getContenttypeId()
                          {
                          return contenttypeId;
                          }

                          /**
                          * This method was generated by Apache iBATIS ibator. This method sets the value of the database column category.contenttype_id
                          *
                          * @param contenttypeId
                          * the value for category.contenttype_id
                          *
                          * @ibatorgenerated Fri Jun 05 10:55:52 BDT 2009
                          */
                          public void setContenttypeId(Integer contenttypeId)
                          {
                          this.contenttypeId = contenttypeId;
                          }

                          /**
                          * This method was generated by Apache iBATIS ibator. This method returns the value of the database column category.name
                          *
                          * @return the value of category.name
                          *
                          * @ibatorgenerated Fri Jun 05 10:55:52 BDT 2009
                          */
                          public String getName()
                          {
                          return name;
                          }

                          /**
                          * This method was generated by Apache iBATIS ibator. This method sets the value of the database column category.name
                          *
                          * @param name
                          * the value for category.name
                          *
                          * @ibatorgenerated Fri Jun 05 10:55:52 BDT 2009
                          */
                          public void setName(String name)
                          {
                          this.name = name;
                          }

                          /**
                          * This method was generated by Apache iBATIS ibator. This method returns the value of the database column category.sequence_number
                          *
                          * @return the value of category.sequence_number
                          *
                          * @ibatorgenerated Fri Jun 05 10:55:52 BDT 2009
                          */
                          public Integer getSequenceNumber()
                          {
                          return sequenceNumber;
                          }

                          /**
                          * This method was generated by Apache iBATIS ibator. This method sets the value of the database column category.sequence_number
                          *
                          * @param sequenceNumber
                          * the value for category.sequence_number
                          *
                          * @ibatorgenerated Fri Jun 05 10:55:52 BDT 2009
                          */
                          public void setSequenceNumber(Integer sequenceNumber)
                          {
                          this.sequenceNumber = sequenceNumber;
                          }

                          @Override
                          public int hashCode()
                          {
                          final int prime = 31;
                          int result = 1;
                          result = prime * result + ((categoryId == null) ? 0 : categoryId.hashCode());
                          result = prime * result + ((contenttypeId == null) ? 0 : contenttypeId.hashCode());
                          result = prime * result + ((name == null) ? 0 : name.hashCode());
                          result = prime * result + ((sequenceNumber == null) ? 0 : sequenceNumber.hashCode());
                          return result;
                          }

                          @Override
                          public boolean equals(Object obj)
                          {
                          if (this == obj)
                          return true;
                          if (obj == null)
                          return false;
                          if (getClass() != obj.getClass())
                          return false;
                          Category other = (Category) obj;
                          if (categoryId == null)
                          {
                          if (other.categoryId != null)
                          return false;
                          }
                          else if (!categoryId.equals(other.categoryId))
                          return false;
                          if (contenttypeId == null)
                          {
                          if (other.contenttypeId != null)
                          return false;
                          }
                          else if (!contenttypeId.equals(other.contenttypeId))
                          return false;
                          if (name == null)
                          {
                          if (other.name != null)
                          return false;
                          }
                          else if (!name.equals(other.name))
                          return false;
                          if (sequenceNumber == null)
                          {
                          if (other.sequenceNumber != null)
                          return false;
                          }
                          else if (!sequenceNumber.equals(other.sequenceNumber))
                          return false;
                          return true;
                          }


                          }

                          • 12. Re: Problems with rich:orderedList
                            Nick Belaevski Master

                            This may also happen if data changes between requests. Make sure that DAO satisfies this requirement. What is bean scope?

                            • 13. Re: Problems with rich:orderedList
                              Kashif Nazar Newbie

                              i am sorry. I posted it two times

                              • 14. Re: Problems with rich:orderedList
                                Kashif Nazar Newbie

                                bean scope is request. The DAO will always return the same results

                                1 2 Previous Next