executeActionWithViewAfterService, how does it work?

1 view
Skip to first unread message

Derrick Anderson

unread,
Mar 9, 2008, 6:08:27 PM3/9/08
to guasaxcoders
hi, i'm new to guasax- and i'm starting out with a simple app and
can't get past the login phase, I don't understand how this method
works, the resultHandler for the 'executeService' method in the BO
get's called, but the view update specified in
'executeActionWithViewAfterService' never get's called...

_________________________________________________

VIEW::: login.mxml
_________________________________________________

private function doLogin():void
{
if(username.text.length > 0 && password.text.length > 0)
{
var params:Array = [username.text,password.text];
var viewParams:Array = null;
var responseVO:ResponseActionVO =
GuasaxContainer.getInstance().executeActionWithViewAfterService(Constants.AUTHENTICATE,
params,

[ViewLocator.getInstance().getViewObject(Constants.LOGIN_VIEW)],
Constants.LOGIN_HANDLER,
viewParams);

loginBtn.enabled=false;
}
else
{
Alert.show('Please fill out the login form.');
}
}
_________________________________________________

BO::: SecurityBO.as, this is where the method for
Constants.AUTHENTICTE lives
_________________________________________________

public function authenticate(username:String,password:String):void{
var params:Array = [username,password];
ServiceLocator.getInstance().executeService("securityCFC",

"authenticate",
params,
resultHandler,
faultHandler,
this);

}

ablesa

unread,
Mar 9, 2008, 7:08:29 PM3/9/08
to guasaxcoders
Hi, may be the reason is Constants.LOGIN_HANDLER method is not public.
This method must be public in order this can be executed by
reflection.


GuasaxContainer.getInstance().executeActionWithViewAfterService(Constants.AUTHENTICATE,
params,
[ViewLocator.getInstance().getViewObject(Constants.LOGIN_VIEW)],
Constants.LOGIN_HANDLER,
viewParams);

I hope this information can be useful to solve that problem,
drop me a line if you have any other problem or this problem persist.


On Mar 9, 11:08 pm, Derrick Anderson <no.way.this.is.in....@gmail.com>
wrote:

Derrick Anderson

unread,
Mar 9, 2008, 7:11:57 PM3/9/08
to guasaxcoders
actually, that was it- thanks!
Reply all
Reply to author
Forward
0 new messages