UserManager - update UI

Hi,

My method changes the background-color of a field depending on the status of an object (e.g. state 1 = green, state 2 = yellow…)

I run the method with the UserManger plugin an it works perfectly on the client where I give the command I get the message on other clients but it does not update
the color.

var vClients = plugins.UserManager.getClients()
	for (var i = 0; i < vClients .length; i++)
	{
	    var client = vClients [i];
	    client.executeMethod(globals.onDataChangeActionP2(actionName,statePerc));
	    client.sendMessage(i18n.getI18NMessage('color changed'))            
	}

Can someone point out what is wrong?

Update:

I tried something very simple in my global method like:

forms.object_controlpannel.elements.tabs_action.tabIndex = 2;

But it doesn’t work. It seems that UserManager has a problem with UI because other methods changing only the data works well.

I don’t think you can interact with the GUI of remote clients, what if a client has not yet loaded that form?

I am sure that all clients have loaded that form, is the only form they can use.
May be I have to explain a little bit better. This app. is a “serious game”. 4 people at time are invited to play the game together and the data the game produces is used for research.

Each of them has an object_kind (e.g. street, or water etc.)
In the form all objects are displayed with a color depending of their state. Depending of an action a player fire on his object, the object will change color. The problem is that all objects must be updated on all players.

May be is UserManager never ment to do that, but how else?

I guess you could have a look at the onDataBroadcast event of the solution to trigger your color changes.

Is the method really fired in the client? Could you show a message or something before you do something UI related?

I can’t see why something UI related shouldn’t work really… In any case, I wouldn’t say it’s a plugin issue. The plugin uses the same mechanism that is used for the deep link, I think. What works there, should work with the plugin.