I am having trouble with dynamic attributes when using a SPA. For example in my menu I have “Log in” and “Log out” that have dynamic attributes to show and hide according to the users logged in status.
This works fine if I refresh the page however what I want it to do is to update without the page refresh.
** EDIT ** In the process of writing the example below I discovered that the problem is solved by removing the session manager from the ‘Content Page’. The reason I added it is because if I don’t then I don’t see the Session available when I click the dynamic action picker button. ** END EDIT **
Yes - I think this has something to do with binding but I am still learning how all that works.
The issue is when I change a session variable in a child ‘Content Page’ this change does not have any affect on the parent until the page is reloaded.
A simple example is to:
Main page
Create a Single page app with a ‘Content Page’.
Add a session storage manager and give it a name and add a variable
Add a paragraph that shows the value of the variable
Content page
Add a session storage manager and give it the same name as step 2 above so you can access the variable
In the content page place two buttons - when clicked they update the Variable with a value like ‘Button 1’ and ‘Button 2’.
Add a paragraph that shows the value of the variable
Now when you click the button you will see that only the value being displayed on the content page updates.