Hi Mariela,
Yes, the OnInitialize executes before. But you are just showing a message. The screen is still being executed.
The data will be retrieved asynchronously while the screen is rendered.
Here you have two options, at least.
1. Adopts an offline model, using local entities and synchronizing when required and network is available
2. Adopts redirecting to a screen to warn the user he is offline.
Cheers
Eduardo Jauch