// turn on the the immediate attribute so the validation
// logic is not invoked when switching tabs
attr = new AttributeBean();
attr.setName("immediate");
attr.setValue("true");
link.addAttribute(attr);
// add a action method binding event when the link is clicked
attr = new AttributeBean();
attr.setName("action");
attr.setValue("#{@managed-bean-name.changeTab}");