Hi guys,
One quick question. I’m using UserEvents in my app. I used it before and it worked just fine, but at this moment it has a strange behaviour.
I have in my MainView.ux the UserEvent declared:
<UserEvent ux:Name="saveEditPlanning" />
And then in the page I want to Raise the event, with one argument:
<RaiseUserEvent EventName="saveEditPlanning">
<UserEventArg Name="planningSaved" StringValue=“DATA_SAVED” />
</RaiseUserEvent>
And when I want to get the Event:
<OnUserEvent EventName="saveEditPlanning">
<Callback Handler="{updateData}" />
</OnUserEvent>
function updateData(args){
console.log("updateData");
console.log(JSON.stringify(args));
console.log(JSON.stringify(args.planningSaved));
}
in which the logs show:
LOG: updateData
LOG: {
"node": {
"external_object": {},
"_raw_Parameter": {
"_subscribers": [null, null],
"_isLeaf": true,
"_values": [“…”]
},
"_Parameter": {
"_subscribers": [null],
"_isLeaf": false,
"_values": [{
"args": {
…
}
}]
}
},
"data": {
"date": {
"_subscribers": [null],
"_isLeaf": true,
"_values": ["Monday, 2 January 2017"]
},
… ,
"planning": {
"_subscribers": [null],
"_isLeaf": true,
"_values": [{
"args": {
…
}
}]
}
},
"sender": "PlanningDetails"
}
LOG: null
The problem here is that I can’t get the arguments passed when I raise the event, it shows me everything but the argument. And my argument is null.
When I navigate to the page I pass as parameter an object with the data I need to show, which is in this “args”.
Have some of you ever see something like this and know how to fix?
Thanks in advance.