2 Replies Latest reply: Feb 14, 2008 10:25 AM by 807601 RSS

    Manipulating Arrays from DataBeans - WCS

    807601
      (Using WebSphere Commerce)
      I have a database that holds 3 types of DataBeans: ProductBean, BundleBean, and ItemBean. These beans each have a rank assigned to them, so I know in which order to display them. I need to be able to create an array of just ProductBeans and BundleBeans, ignoring ItemBeans completely, that will maintain the rank assigned to them, and also be able to keep track of the number of records in the array.

      My current code does everything except ignore the ItemBeans. This is what is causing my problem; I don't want the ItemBeans even noticed, much less placed into the array.

      I'm sure more info and/or code will be needed, but any help is appreciated on this. I have run through so many different pieces of pseudo-code, my window is very cluttered and my brain is on overload.

      Thanks!!
        • 1. Re: Manipulating Arrays from DataBeans - WCS
          807601
          what specifically is the problem?
          we can't see your code or read your mind here
          how can we help?
          i personally know nothing about WS Ecommerce and don't know anyone that's ever used it
          • 2. Re: Manipulating Arrays from DataBeans - WCS
            807601
            The problem, specifically, is that, when ItemBeans are returned into my array, I receive an inaccurate count on my page of displayed products and my displayed products are not sequenced properly. This is due to ItemBeans not having a rank assigned to them; just ProductBeans and BundleBeans.

            I need to know how to avoid returning the ItemBeans in my array. I have thought about creating an array of ProductBeans, and an array of BundleBeans, then merging them together, but I have to make sure to maintain their rank with them, or it doesn't solve my problem.

            Without knowledge of WebSphere Commerce, I don't know how much help you can give, since these Beans are WebSphere Commerce Beans.