You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@royale.apache.org by "romanisitua@yahoo.com" <ro...@yahoo.com> on 2021/08/10 14:11:38 UTC
Re: users Digest 9 Aug 2021 07:13:30 -0000 Issue 1747
Your code works. I have learnt a new way to handle this scenario.
Thanks Maria.
On Monday, August 9, 2021, 08:13:31 AM GMT+1, users-digest-help@royale.apache.org <us...@royale.apache.org> wrote:
users Digest 9 Aug 2021 07:13:30 -0000 Issue 1747
Topics (messages 4801 through 4801)
Re: users Digest 5 Aug 2021 01:58:36 -0000 Issue 1739
4801 by: romanisitua.yahoo.com
Administrivia:
---------------------------------------------------------------------
To post to the list, e-mail: users@royale.apache.org
To unsubscribe, e-mail: users-digest-unsubscribe@royale.apache.org
For additional commands, e-mail: users-digest-help@royale.apache.org
----------------------------------------------------------------------
Thanks for this. I will pull the source and try it out.
Sent from Yahoo Mail on Android
On Mon, 9 Aug 2021 at 0:30, Maria Jose Esteve<mj...@iest.com> wrote: <!--#yiv7036876134 filtered {}#yiv7036876134 filtered {}#yiv7036876134 filtered {}#yiv7036876134 filtered {}#yiv7036876134 filtered {}#yiv7036876134 p.yiv7036876134MsoNormal, #yiv7036876134 li.yiv7036876134MsoNormal, #yiv7036876134 div.yiv7036876134MsoNormal {margin:0cm;font-size:11.0pt;font-family:"Calibri", sans-serif;}#yiv7036876134 a:link, #yiv7036876134 span.yiv7036876134MsoHyperlink {color:blue;text-decoration:underline;}#yiv7036876134 p.yiv7036876134msonormal, #yiv7036876134 li.yiv7036876134msonormal, #yiv7036876134 div.yiv7036876134msonormal {margin-right:0cm;margin-left:0cm;font-size:11.0pt;font-family:"Calibri", sans-serif;}#yiv7036876134 span.yiv7036876134EstiloCorreo29 {font-family:"Open Sans", sans-serif;color:windowtext;font-weight:normal;font-style:normal;}#yiv7036876134 .yiv7036876134MsoChpDefault {font-family:"Calibri", sans-serif;}#yiv7036876134 filtered {}#yiv7036876134 div.yiv7036876134WordSection1 {}-->
Hello,
I have added an example in your repo by editing my previous PR, I don't know if I did it right. If you can't retrieve it let me know and I'll send it to you.
The application "AppTestBinding.mxml", the main view "MainContentTestBinding.mxml" and a child view with a Card "ViewTestBinding".
I don't know if this is the most correct way to do it but I think it could be a valid implementation for the double binding you propose.
Hiedra.
De: romanisitua@yahoo.com <ro...@yahoo.com>
Enviado el: jueves, 5 de agosto de 2021 13:49
Para: users@royale.apache.org
Asunto: Re: users Digest 5 Aug 2021 01:58:36 -0000 Issue 1739
Unfortunately it does not work.
One clarification from your earlier response.
Where am I supposed to add the following
" To activate the binding you must add the corresponding bead: <js:ViewDataBinding/>, in case of views, <js:ContainerDataBinding/> in case of containers. "
In the two views ? Or in the responsive view ?
The first view is a Card while the second one is HGroup.
Would also appreciate clarification on the difference between container, view and application binding and wgennto use each ?
Sent from Yahoo Mail on Android
On Thu, 5 Aug 2021 at 2:58,users-digest-help@royale.apache.org
<us...@royale.apache.org> wrote:
users Digest 5 Aug 2021 01:58:36 -0000 Issue 1739
Topics (messages 4792 through 4792)
Re: Access current State from other files?
4792 by: Maria Jose Esteve
Administrivia:
---------------------------------------------------------------------
To post to the list, e-mail: users@royale.apache.org
To unsubscribe, e-mail: users-digest-unsubscribe@royale.apache.org
For additional commands, e-mail: users-digest-help@royale.apache.org
----------------------------------------------------------------------
Hello,
I would do it with the binding:
- Add to the two views the beads <js:SimpleStatesImpl/>.
- Add the states also to the two views (I'm not sure if this is mandatory... I have them in all the files).
- To activate the binding you must add the corresponding bead: <js:ViewDataBinding/>, in case of views, <js:ContainerDataBinding/> in case of containers.
- Pass the currentState variable from the ApplicationResponsiveView to the Card, something like this:
<view:Content currentState="{currentState}">
</view:Content>
I hope this helps.
See you tomorrow.
Hiedra.
De: romanisitua@yahoo.com <ro...@yahoo.com>
Enviado el: miércoles, 4 de agosto de 2021 21:55
Para: users@royale.apache.org
Asunto: Access current State from other files?
Hi Everyone,
I have created a simple application with two views one for a login form and the other is main view that shows the application. To make the code readable I decided to put the view definition in separate files and call them from the Responsive View. I have defined the states of the app accordingly.
Main.mxml
<?xml version="1.0" encoding="utf-8"?>
<j:ApplicationResponsiveView xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:j="library://ns.apache.org/royale/jewel"
xmlns:js="library://ns.apache.org/royale/basic"
xmlns:html="library://ns.apache.org/royale/html"
xmlns:mx="library://ns.apache.org/royale/mx"
xmlns:view="*" initComplete="initCompleteHandler(event)">
<fx:Script>
<![CDATA[
private function initCompleteHandler(event:Event):void
{
trace("Main ResponsiveView is ready !!! ");
trace(" set initial current state to log in ..");
currentState = 'login';
trace(" currentState: " + currentState);
}
]]>
</fx:Script>
<j:states>
<js:State name="login" />
<js:State name="loggedIn" />
</j:states>
<j:beads>
<js:SimpleStatesImpl/>
</j:beads>
<view:LogIn includeIn="login">
</view:LogIn>
<j:ApplicationMainContent id="mainContent" hasTopAppBar="true" hasFooterBar="true" selectedContent="content" includeIn="loggedIn">
<j:SectionContent id="sc" name="content">
<view:Content>
</view:Content>
</j:SectionContent>
</j:ApplicationMainContent>
</j:ApplicationResponsiveView>
The log in view is defined as follows
?xml version="1.0" encoding="utf-8"?>
<j:Card xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:j="library://ns.apache.org/royale/jewel"
xmlns:js="library://ns.apache.org/royale/basic"
xmlns:html="library://ns.apache.org/royale/html"
id="loginForm" x="60", y="60" height="50%">
<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" emphasis="primary" click="currentState = 'loggedIn'" />
</j:Card>
Everything compiles fine. When I run the application and click log in button the view does not change to the Content view. In other words the button does not work.
However, If I embed the logIn.mxml inside the Main.mxml it works fine.
How can I access the Main.mxml current state from another file ?
Regards,