Use var declaration  instead of type variable

Add list selection to viewElement