I'm new to JSF - I need to implement a generic panel that, based on clicking on btn1 or btn2 shows panel1 or panel2. What is the best way to do this?
Edit
One of the things I want to do is encapsulate some logic within each implementation of the generic component - I don't know if composites are the best way to achieve it, even though I know I can pass values/methods into the composite via attributes