2 Replies Latest reply: Nov 23, 2009 3:24 PM by Frank Nimphius-Oracle RSS

    Carousel does not make the selected row current

    Michael Koniotakis
      Carousel is a realy nice new component in jdeveloper 11 patch1

      Yet when you select a new item the current row of the iterator is not changed.
      So if you want to have other fields of the same iterator in the page or detail view objects iterators the data are not refreshed while navigating in Carousel.
      I think a selectionListener as in the table component is missing.

      I have posted a workaround of to achieve the above behaviour :
      [http://adfbugs.blogspot.com/2009/11/carousel-does-not-make-selected-row.html]
      I binded carouselSpinListener property to a backing bean method where
      i get the carusel event NewItemKey and i find the Key of the row and i set iterator current row to the carusel selected row.

      Shouldn't this exist by default in carousel component as selection listener in tables?
        • 1. Re: Carousel does not make the selected row current
          lucbors
          I ran into the same problem last week. I came with the same workaround.

          There is also another problem with the carousel. This is obviously migth related to the problem described above.
          If you want the carousel to respond to a partial trigger event it doesn't seem to work.

          The use case here is that I have a form that has a masterdetail relationship with the carousel. When I use the previous and next buttons the carousel should refresh.
          I only got it working by binding the carousel to a bean and invoking a mehod on the previous and next button. This method does the actual refresh in the bean.

          <pre>
          public String refreshCarousel() {
          AdfFacesContext adfFacesContext = AdfFacesContext.getCurrentInstance();
          adfFacesContext.addPartialTarget(this.carousel);
          return null;
          }
          </pre>

          Regards

          Luc Bors
          • 2. Re: Carousel does not make the selected row current
            Frank Nimphius-Oracle
            Hi,

            from the component doc:

            oracle.adf.view.rich.event.CarouselSpinEvent      - The spin event is delivered when the table selection changes.

            So the spin event indeed is the "selection" event equivalent. I agree however that it should be possible to set the current row declaratively. For this the FacesCtrlHierBinding class needs to be changed. The current implementation extepcts a selection event and not a CarouselSpinEvent. So a new binding method is needed, which is a sensible enhancement request that I'll file.

            Frank

            Ps.: ER filed

            Edited by: Frank Nimphius on Nov 23, 2009 10:24 PM