genlist: refactor code.
genlist: refactor code.

select/unselect items by using common select function.

rvandegrift/elementary,rvandegrift/elementary,tasn/elementary,tasn/elementary,FlorentRevest/Elementary,tasn/elementary,FlorentRevest/Elementary,tasn/elementary,tasn/elementary,rvandegrift/elementary,FlorentRevest/Elementary,rvandegrift/elementary,FlorentRevest/Elementary