AnsweredAssumed Answered

IdentityManager Event Listeners using AMD Syntax

Question asked by PHolleran-esristaff Employee on Jun 6, 2013
Latest reply on Jun 6, 2013 by PHolleran-esristaff
I am trying to connect to the IdentityManager's "onDialogCancel" event and am not having success trying to adapt the legacy dojo style referenced here: http://forums.arcgis.com/threads/66410-Identity-Manager-Event-Listeners?highlight=identity+manager+cancel to AMD.

The app is written using v 3.5 of the JSAPI.

Here is the code, inside of a define that includes, among other things, [on,IdentityManager,esriPortal]:


function logIn(){
[INDENT]currentPortal = new esriPortal.Portal(registry.byId("portalInput").get("value"));[/INDENT]

[INDENT]on(esri.id, "onDialogCancel", function(info){[/INDENT]
[INDENT][INDENT]console.log("cancelled");[/INDENT][/INDENT]
[INDENT]});[/INDENT]

[INDENT]currentPortal.signIn().then(function(loggedInUser){[/INDENT]
[INDENT][INDENT]// function here[/INDENT][/INDENT]
[INDENT]});[/INDENT]
}

I appreciate any help people can provide.

Thanks.

Outcomes