navigation between views in flex from popup -


enter image description here

i work on flex application. have following problem :in fact, in first page popup of authentification appears closed if user exists in database. part works correctly, in popup make link helps user recover account. problem didn't know how navigate page of recovering email, use state didn't work please can me . code of authentification popup

<?xml version="1.0" encoding="utf-8"?> <s:titlewindow xmlns:fx="http://ns.adobe.com/mxml/2009"                xmlns:s="library://ns.adobe.com/flex/spark"                xmlns:mx="library://ns.adobe.com/flex/mx"                xmlns:services="services.*"                x="400" y="400" width="400" height="196" cornerradius="10"                creationcomplete="doinit();" fontsize="12" title="authentication" xmlns:local="*">     <fx:declarations>         <s:callresponder id="authenticateuserresult"/>         <services:userserviceimpl id="userserviceimpl"                                   fault="alert.show(event.fault.faultstring + '\n' + event.fault.faultdetail)"                                   showbusycursor="true">             <services:channelset>                 <s:channelset>                     <s:amfchannel uri="http://localhost:8080/smartsupport/messagebroker/amf"/>                 </s:channelset>             </services:channelset>         </services:userserviceimpl>         <s:callresponder id="setmystringresult"/>         <services:mysessionhandler id="mysessionhandler"                                    fault="alert.show(event.fault.faultstring + '\n' + event.fault.faultdetail)"                                    showbusycursor="true">             <services:channelset>                 <s:channelset>                     <s:amfchannel uri="http://localhost:8080/smartsupport/messagebroker/amf"/>                 </s:channelset>             </services:channelset>         </services:mysessionhandler>              <s:callresponder id="authenticationresp"/>          <!-- placer ici les éléments non visuels (services et objets de valeur, par exemple). -->     </fx:declarations>       <fx:script>         <![cdata[             import com.roamsmart.acl.currentuser;              import mx.controls.alert;             import mx.core.application;             import mx.core.flexglobals;             import mx.events.closeevent;             import mx.managers.popupmanager;             import mx.rpc.events.resultevent;              import valueobjects.userentity;               [bindable]             public var currentu : userentity = new userentity();              protected function login_clickhandler(event:mouseevent):void             {                 authenticateuserresult.addeventlistener(resultevent.result,activateuser);                 authenticateuserresult.token = userserviceimpl.authenticateuser(name_.text, pass.text);                          }              private function doinit():void             {                                this.addeventlistener(keyboardevent.key_up, handlekeystrokes);              }              public function handlekeystrokes(evt:keyboardevent):void             {                 if(evt.keycode == keyboard.enter)                 {                                        authenticateuserresult.addeventlistener(resultevent.result,activateuser);                     authenticateuserresult.token = userserviceimpl.authenticateuser(name_.text, pass.text);                      }             }              private function activateuser(event:object):void{                 var user:userentity = authenticateuserresult.lastresult userentity;                 if(user)                 {                     if(user.enabled)                     {                         currentuser.currentuser=user;                         popupmanager.removepopup(this);                         currentu = user;                         dispatchevent(new closeevent(closeevent.close, true, false));                     }                     else                     {                         errorhbox.visible = true;                         errorlabel.text = "this user account disabled";                         name_.text = "";                         pass.text = "";                     }                  }                 else                 {                     errorhbox.visible = true;                        name_.text = "";                     pass.text = "";                 }                }              protected function authenticateuser(arg0:string, arg1:string):void             {                 authenticateuserresult.token = userserviceimpl.authenticateuser(arg0, arg1);               }           ]]>     </fx:script>     <s:states>         <s:state name="forgivepasswordstate"/>         <s:state name="index"/>      </s:states>       <mx:hbox id="errorhbox" visible="false" width="98%" horizontalalign="center" paddingleft="10"              paddingtop="10" verticalalign="middle">         <s:image width="32" height="32" source="@embed('assets/warning.png')"/>         <s:label id="errorlabel" color="red" fontsize="12" fontweight="bold"                  text="wrong username/password combination"/>     </mx:hbox>       <!--<s:label x="10" y="13" color="#f6800e" fontsize="14"     text="your session has been expired, please log in again"/>-->     <!--<mx:textinput id="name_" x="192" y="43" width="157" height="22" text=""/> -->     <mx:textinput id="name_" x="189" y="42" width="159" fontsize="15" fontweight="normal" text=""/>     <mx:textinput id="pass" x="191" y="71" width="158" displayaspassword="true"/>     <mx:label x="95" y="44" width="86" height="21" color="#024c9e" fontsize="12" text="user name"/>     <mx:label x="96" y="74" width="65" height="21" color="#024c9e" fontsize="12" text="password"/>     <s:button id="linkbtnforgpwd" left="10" bottom="28" width="157" label="i forgot password"              color="#000000" cornerradius="5"               enabled="true" fontsize="12" icon="assets/lock_key.png"               skinclass="spark.skins.spark.buttonskin" stylename="linkbutton"/>     <s:button x="191" y="114" width="157" label="log in" click="login_clickhandler(event)"               cornerradius="5" fontsize="12"/>     <s:image x="7" y="115" width="29" height="20" source="assets/forgot_icon.png"/>  </s:titlewindow> 

i have corrected code panel appears when user click on button"i forget password" appears on popup mentionned in screen shot

![<?xml version="1.0" encoding="utf-8"?> <s:titlewindow xmlns:fx="http://ns.adobe.com/mxml/2009"                xmlns:s="library://ns.adobe.com/flex/spark"                xmlns:mx="library://ns.adobe.com/flex/mx"                xmlns:services="services.*"                x="400" y="400" width="400" height="196" cornerradius="10"                creationcomplete="doinit();" fontsize="12" title="authentication" xmlns:local="*">     <fx:declarations>         <s:callresponder id="authenticateuserresult"/>         <services:userserviceimpl id="userserviceimpl"                                   fault="alert.show(event.fault.faultstring + '\n' + event.fault.faultdetail)"                                   showbusycursor="true">             <services:channelset>                 <s:channelset>                     <s:amfchannel uri="http://localhost:8080/smartsupport/messagebroker/amf"/>                 </s:channelset>             </services:channelset>         </services:userserviceimpl>         <s:callresponder id="setmystringresult"/>         <services:mysessionhandler id="mysessionhandler"                                    fault="alert.show(event.fault.faultstring + '\n' + event.fault.faultdetail)"                                    showbusycursor="true">             <services:channelset>                 <s:channelset>                     <s:amfchannel uri="http://localhost:8080/smartsupport/messagebroker/amf"/>                 </s:channelset>             </services:channelset>         </services:mysessionhandler>              <s:callresponder id="authenticationresp"/>          <!-- placer ici les éléments non visuels (services et objets de valeur, par exemple). -->     </fx:declarations>       <fx:script>         <!\[cdata\[             import com.roamsmart.acl.currentuser;              import mx.controls.alert;             import mx.core.application;             import mx.core.flexglobals;             import mx.events.closeevent;             import mx.managers.popupmanager;             import mx.rpc.events.resultevent;              import valueobjects.userentity;               \[bindable\]             public var currentu : userentity = new userentity();              protected function login_clickhandler(event:mouseevent):void             {                 authenticateuserresult.addeventlistener(resultevent.result,activateuser);                 authenticateuserresult.token = userserviceimpl.authenticateuser(name_.text, pass.text);                          }              private function doinit():void             {                                this.addeventlistener(keyboardevent.key_up, handlekeystrokes);              }              public function handlekeystrokes(evt:keyboardevent):void             {                 if(evt.keycode == keyboard.enter)                 {                                        authenticateuserresult.addeventlistener(resultevent.result,activateuser);                     authenticateuserresult.token = userserviceimpl.authenticateuser(name_.text, pass.text);                      }             }              private function activateuser(event:object):void{                 var user:userentity = authenticateuserresult.lastresult userentity;                 if(user)                 {                     if(user.enabled)                     {                         currentuser.currentuser=user;                         popupmanager.removepopup(this);                         currentu = user;                         dispatchevent(new closeevent(closeevent.close, true, false));                     }                     else                     {                         errorhbox.visible = true;                         errorlabel.text = "this user account disabled";                         name_.text = "";                         pass.text = "";                     }                  }                 else                 {                     errorhbox.visible = true;                        name_.text = "";                     pass.text = "";                 }                }              protected function authenticateuser(arg0:string, arg1:string):void             {                 authenticateuserresult.token = userserviceimpl.authenticateuser(arg0, arg1);               }           \]\]>     </fx:script>     <s:states>         <s:state name="forgivepasswordstate"/>         <s:state name="index"/>      </s:states>       <mx:hbox id="errorhbox" visible="false" width="98%" horizontalalign="center" paddingleft="10"              paddingtop="10" verticalalign="middle">         <s:image width="32" height="32" source="@embed('assets/warning.png')"/>         <s:label id="errorlabel" color="red" fontsize="12" fontweight="bold"                  text="wrong username/password combination"/>     </mx:hbox>       <!--<s:label x="10" y="13" color="#f6800e" fontsize="14"     text="your session has been expired, please log in again"/>-->     <!--<mx:textinput id="name_" x="192" y="43" width="157" height="22" text=""/> -->     <mx:textinput id="name_" x="189" y="42" width="159" fontsize="15" fontweight="normal" text=""/>     <mx:textinput id="pass" x="191" y="71" width="158" displayaspassword="true"/>     <mx:label x="95" y="44" width="86" height="21" color="#024c9e" fontsize="12" text="user name"/>     <mx:label x="96" y="74" width="65" height="21" color="#024c9e" fontsize="12" text="password"/>     <s:button id="linkbtnforgpwd" left="10" bottom="28" width="157" label="i forgot password" click="this.currentstate='forgivepasswordstate'"              color="#000000" cornerradius="5"               enabled="true" fontsize="12" icon="assets/lock_key.png"               skinclass="spark.skins.spark.buttonskin" stylename="linkbutton"/>     <s:button x="191" y="114" width="157" label="log in" click="login_clickhandler(event)"               cornerradius="5" fontsize="12"/>     <s:image x="7" y="115" width="29" height="20" source="assets/forgot_icon.png"/>     <local:forgotpassword includein="forgivepasswordstate"/>  </s:titlewindow>][1] 

i don't see code try change state. need add event listener on "forgot icon" image?

<s:image x="7" y="115" width="29" height="20" source="assets/forgot_icon.png" click="{currentstate='forgivepasswordstate'}"/> 

Comments

Popular posts from this blog

HTTP/1.0 407 Proxy Authentication Required PHP -

curl - PHP fsockopen help required -

c# - Resource not found error -