SPA and Dynamic Attributes

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.

What am I missing?

Hi @ASmyth can you explain your issue a little more detailed please?

** 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

  1. Create a Single page app with a ‘Content Page’.
  2. Add a session storage manager and give it a name and add a variable
  3. Add a paragraph that shows the value of the variable

Content page

  1. Add a session storage manager and give it the same name as step 2 above so you can access the variable
  2. In the content page place two buttons - when clicked they update the Variable with a value like ‘Button 1’ and ‘Button 2’.
  3. 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.

Yes, it must be on the parent page. We are going to fix the issue with it not showing the values in the data picker, please check the following topic:

1 Like

Thanks @Teodor that will be helpful.