pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brendan cheng <ccp...@hotmail.com>
Subject RE: Remove component from Accordion
Date Sun, 08 Jan 2012 07:51:40 GMT

I found a way to remove component.  it is from getPanels() of Accordion.

From: ccp999@hotmail.com
To: user@pivot.apache.org
Subject: Remove component from Accordion
Date: Sun, 8 Jan 2012 03:43:17 +0000

I was trying to remove a component from an Accordion but failed.After a trace, I found your
code in Accordion class as
    public Sequence<Component> remove(int index, int count) {
        for (int i = index, n = index + count; i < n; i++) {
            Component component = get(i);

            if (panels.indexOf(component) >= 0) {
                throw new UnsupportedOperationException();

        // Call the base method to remove the components
        return super.remove(index, count);
which if the component index to be removed is greater than or equal to zero will throw a UnsupportedOperationException.Is
that mean, we can't remove component from accordion or it is a bug?
View raw message