Question: I have a dialog box that appears and while closing keyboard with `hideKeyboard();` all the form is closed and i get back to the home page so that i can't continue the scenario for filling other data. 

Here the screen : 

[![enter image description here](https://i.stack.imgur.com/oYjFR.png)](https://i.stack.imgur.com/oYjFR.png)

Answer: 
Use @JsonIgnore, this will make it available in the back but will not return when transforming to json

```
@Size(min = 8)
@JsonIgnore
private String password;

```
I don't think there is a way to just ignore some fields when getting the entity from db, because those entities wouldn't be in a consistent state - their data would differ from the data in the database. Other options exist, though (custom query, projections).

One option is to use [constructor expressions](http://docs.oracle.com/html/E24396_01/ejb3_langref.html#ejb3_langref_constructor) and fill some POJO with only needed data in the query directly

```
select new my.company.SafeUser(u.username, u.email) from User u

```

Anyway, I think you should send DTOs to the frontend, and in it expose just the attributes you need on the frontend. That approach has much advantages, weather you initialize them like in the example above, or in the loop over results.