Hi Shreyas,

What Sankar means is, when you call your service from the function
'clickHandler' then the call goes to server(which doesn't halt the
clickHandler method till the result is coming back from service) and
the next steps in the clickHandler get executed.

If you want to get hold of the result from the service then you should
write a function on the result event of service declaration (e.g.
webservice), because resultEvent holds the data in its result if the
server side method gets executed successfully.

Token is used to verify your data. That is to check whether you are
getting the data for correct person or not.

HTH,

-Ravi

On Jun 28, 12:01 pm, Shreyas <[email protected]> wrote:
> What exactly is the 'token' doing in the responder?
>
> What I am trying to achieve is that once a login is successful, there
> is a change of state, so the login button click handler should manage
> this.
>
> I'm sorry but I didn't get what you mean by 'after click the event
> finished'
>
> On Jun 28, 2:47 am, sankar swaroop <[email protected]> wrote:
>
> > Here when u click the LoginBtn the flex connects to PHP page and then
> > after click the
> > event finished and u cannot again get access inside it.
> > So outside of this click event u can access data.
> > So u must use result  event for the service u r using to connect to PHP 
> > page.
>
> > Thanks
>
> > On Sun, Jun 28, 2009 at 12:02 AM, Shreyas<[email protected]> wrote:
>
> > > Hi,
>
> > > I was trying to create a simple login form using Flash Builder by
> > > connecting to a PHP script.
>
> > > For the  clickHandler of the Login Button, I have the code as-
>
> > > checkLoginResult.token = myPHPLogin.checkLogin
> > > (username.text,password.text);
>
> > > where checkLoginResult is the Call Responder and myPHPLogin is the
> > > service, checkLogin is the procedure which returns an int (1 for
> > > success, 0 for failure)
>
> > > Using Network Monitor, I see that the response is as expected for the
> > > combinations of username and passwords entered.
>
> > > Now, my question is how can we retrieve the result in the clickHandler
> > > function itself? I tried using the lastResult but it does not work
> > > inside the handler. For binding the result to a control, it works
> > > well.
>
> > > Why is this so, and what is the solution?
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to