cancel
Showing results for 
Search instead for 
Did you mean: 

Personas 2.0: Will it be possible to implement event listener in Personas?

Former Member
0 Kudos

Hi Personas 2.0 experts,

In some case we may run into situations that upon users' input actions (eg, a button press, or timeout event from a JS code), we want UI changes (eg display some texts) or do something (eg, cause a button is pressed). Such event handling is in fact usual use case in apps.

Does anyone know how such an event listener can be implemented in Personas 2.0?

Thx!

Dong Zhu

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

You need to remember that Personas, both versions 2 and 3, are built into the webgui framework and the interaction model comes from that framework. Personas is not an environment for general purpose app building.

It is of course event driven, but that is largely hidden in Personas 2. You attach a script to a button, and that causes the script to be executed when the button is clicked. There's an "onclick" event hiding in there somewhere!

In Personas 3 the events are more visible, and there are more events you can attach scripts to, but you still don't have access to all of the events you'd expect in a general purpose JS framework, because that's not what Personas is.

Former Member
0 Kudos

Hi Steve,

Many thanks for the explaination. I full agree that Personas is a tool that is not meant for general UI app development.

While, the special reason for searching such kind of feature is that sometime there is a need to implement a time delay gap if user fires a series of requests to backend and the later request has to wait for the previous request to return some needed results first, or there could simply be some time conflicts among the requests that user has to hold some requests etc. If there had been a feature that allowed the JS code to add an event listener, so the UI will be in "pause state" when user has done some actions, and later the JS-added event will triggle the UI to do more tasks.

I can see at least there is a "onCreateHandle" property for SMEN where a button id can be set to catch the page onLoad event.

Thus I am thingking that it would be really helpful if on each screen property there would be a "general event listener" property where an id of a button can be set in. 
And the event can be "fired" from inside JS code. If Personas supports JS and web objects, it should be possible to do. It may not event be complicated to make, but I just feel it opens a big opptunity for developers to solve a lot practical issues.

I see a script button pressing as an "entry point" for starting an action (ie, user can do a lot things from the scripts there).

Personas 3.0 is definitely the one to be used later, but it still has a way to go to be used in production (just my oppinion - as I see many are still using Personas 2.0 for real business, and for some reason, Personas 3.0 UI rendering is apprantly slow while doing editing flavors, saving flavors etc. We are installing P3 and hopefully it will reach the level for real jobs).

Br,


Dong Zhu

Answers (0)