Page 1 of 1

Get current/active work-screen

PostPosted: Fri Mar 04, 2016 12:48 pm
by jvxdev
How could I get the current/active work-screen from an application?

I know that it's possible to iterate all components of a container but do you have an API or similar?

Re: Get current/active work-screen

PostPosted: Fri Mar 04, 2016 12:58 pm
by Support@SIB
JVx has the IController/IControllable API. This makes it possible to get the current IControllable.
Additional information is available here and in this blog post.

The standard JVx Application and WorkScreen classes extend the ControllerContent. The work-screen sends it state to the application. Use the application instance and call

Code: Select all
getActiveControllable()

to get the active work-screen.

The call

Code: Select all
getActiveControllable().getClass().getName()

will return the class name of your work-screen, but be careful because active controllable can be null!