Control the visibility of an object without using persisted data

How can I do this:  Two buttons on a form (‘Button1’ and ‘Button2’).  Both show up by default.  Clicking ‘Button1’ causes ‘Button2’ to become invisible.  The actual use case has to do with having ‘log in’ type buttons in a layout but want them to hide when someone is registering.  But I can’t make this simple use case work.    
1 answers


If you don’t want persisted data to control this, create a non-persistable entity in your domain model with an attribute to control visibility of Button2.  Then create a nanoflow that sets this attribute to false and put that nanoflow behind button1.  Because the entity is not persistable and this scenario uses nanoflows, all of this activity takes place client side with no server interaction.

Hope that helps,



Maybe some pictures will be helpful.  I created a small example to demonstrate:



Datasource nanoflow for Dataview on page

Nanoflow behind button on page that is circled in red

What happens on the page

Page Video