Get current/active work-screen

General questions regarding the development with JVx.

Get current/active work-screen

Postby jvxdev » Fri Mar 04, 2016 12:48 pm

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?
jvxdev
 
Posts: 19
Joined: Fri Mar 04, 2016 12:40 pm

Re: Get current/active work-screen

Postby Support@SIB » Fri Mar 04, 2016 12:58 pm

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!
User avatar
Support@SIB
 
Posts: 201
Joined: Mon Sep 28, 2009 1:56 pm


Return to Development