Hi *,

can anyone of the Trinidad core developers do me a favour and look at:

http://example.irian.at/trinidad-demo-20070328/faces/components/showOneAccordion.jspx

do you think the behaviour is what a user expects? I would not think
so... When I click on Panel 1 and then on Panel 2, I would suspect
Panel 2 to be opened afterwards, but it isn't.

I've added the following code to CorePanelAccordion to make this work again:

   @Override
   public void queueEvent(FacesEvent event) {
       super.queueEvent(event);

       // Deliver to the default ChartDrillDownEvent
       if (event instanceof DisclosureEvent)
       {
         List li = this.getChildren();

         for(int i=0; i<li.size(); i++) {
           UIComponent comp = (UIComponent) li.get(i);
           if(comp instanceof UIXShowDetail) {
               ((UIXShowDetail) comp).setDisclosed(false);
           }
         }
       }
   }

but - this code will need to be restricted to take events only of
direct children, and only for showOneAccordions. Apart from this -
would you think this is the right approach for a fix?

regards,

Martin

--

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces

Reply via email to