I’m trying to make a pretty simple application. The idea is that I have one main VerticalLayout with grid of clients entity and after clicking on one row I want to see another VerticalLayout with pets that belong to that particular client.
The problem is that setParameter method is called after constructor.
I do not se that as a problem. I suggest that you implement both HasUrlParameter and AfterNavigationObserver in PetView.
You can process the parameter in setParameter and store it as class field.
afterNavigation method is called each time you navigate to PetView. Thus that is the place where you should fetch data from the database according the given clientId. I assume you want to populate the view with fetched data.