Sunday, November 22, 2009

Carousel does not make the selected row current

Carousel is a realy nice new component in jdeveloper 11 patch1
When you create a data binded carousel item it just uses an iterator and a tree model as a table.
Every item in carusel is from a diferent row of the iterator.
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.

In order to achieve the above behaviour i did the following:
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.
public void caruselSpin(CarouselSpinEvent event) {
List l =(List)event.getNewItemKey();
Key k = (Key)l.get(0);
DCIteratorBinding iter = getDCBindingContainer .findIteratorBinding ("DepartmentsView1Iterator");


Now Every time you select new item in carusel the iterator has the selected row.

Test case:


  1. Frank Nimphius has updated and documented this method in.

  2. Hi! I created master/detail form in JDeveloper! Where Carousel is detail form.
    So when I run my page I can see something like this:

    When I navigate witth Carousel to last (3 image) then I can see something like this:

    WHY when I am on first image, I can't see last image in foggy way? And what to do?

    To View Images I use:


    and imegeServlet.

    Hope my question and information is clear and someone can help me. If not clear or need mor information then please let me know.

    Best regards, Debuger!

  3. How to remove that scrolling slider bar in the Carousel component