updated selectPrimary changed javascript to dynamic name bound to attrs.id value - this ensures multiple usage per page