You want the same behavior as js'
accordion ?
If yes, i'm not 100% sure but i don't think there's a built-in method or class that can do that.
If i'd have to do this, i'd define a new class that would extend Controller class (like in ControlP5diyController).
However that could be a nice feature to add.
Andreas would probably have more suggestions.