Make field readonly only when it is an AND-domain

review1137004
Add support for tree state

review1065002