I have a viewstack with 2 views. View 1 is nothing but a
tilelist (multiple columns). View 2 is the same tilelist, but only
has one column (right side) - and also has a container (left side)
with a datagrid as well as binded labels.
The app opens to View 1. User clicks a tile. Switches to View
2. A creationComplete event fires a RemoteObject call (CFC) and
successfully populates the datagrid for that tile ID. Now, still in
View 2, the user can click other tiles (right side) - and a
function is fired that populates the datagrid with data relating to
that tile ID. So far, so good.
Problem occurs when the users clicks back to View 1. Once in
View 1, if the user clicks a tile, switches back to View 2, but the
datagrid fails to populate with the correct data - it just shows
the datagrid from the previous View 2.
This makes sense, since creationComplete is not being fired
again - like itwas initially.
How can I force the function to make the remote call again?
Any way to reset creationComplete so it fires again, or any other
I'm new to all this, so any help is appreciated.
When you are viewing one view of a ViewStack, the others are
considered "invisible" (visible = false). So, instead of using the
creationComplete event to trigger the data retrieval function on
the 2nd view, try using the show event. That way, every time the
2nd view is selected, its visible property will change from false
to true, triggering the show event.