Nice,

I think it’s worth noting that you can also do this:

           <j:Card id="loginForm" visible="true" visible.loggedIn="false">
                <html:H1 text="Royale login"/>
                <j:TextInput id="username" text="someuser"/>
                <j:TextInput id="password" text="somepass">
                    <j:beads>
                        <j:PasswordInput/>
                    </j:beads>
                </j:TextInput>
                <j:Button text="Login" primary="true" click="view.currentState 
= 'loggedIn'" />
            </j:Card>

            <j:Card id="loggedInForm" visible="false" visible.loggedIn="true">
                <html:H1 text="You are logged!! :)"/>
                <j:Button text="Logout" click="view.currentState = 'login'"/>
            </j:Card>

This is something which did not work well in Flex because non-visible elements 
still took up space.

Thanks,
Harbs

> On Jun 6, 2018, at 3:32 PM, Carlos Rovira <[email protected]> wrote:
> 
> Hi Andrew,
> 
> hope you can get some time to review this:
> 
> https://royale.codeoscopic.com/using-view-states-to-show-or-hide-content/ 
> <https://royale.codeoscopic.com/using-view-states-to-show-or-hide-content/>
> 
> Thanks! :)
> 
> 
> -- 
> Carlos Rovira
> http://about.me/carlosrovira <http://about.me/carlosrovira>
> 

Reply via email to