Textfield disabled and bug fix

1. Textfield disabled/enabled subject to the entity
2. some minor bugfix