slectedlnf vs selectedLnf vs server_port_selectedlnf

What is the intended use of the admin parameter ‘selectedLnf’?

My impression was that it was used to push a Look And Feel to the client. Forcing it to use it by default.
The problem is that it is not working.

Don’t know the exact cause of this, but if I set this property to say “com.incors.plaf.kunststoff.KunststoffLookAndFeel”, it is saved in the servoy.properties file as

selectedLnf = com.incors.plaf.kunststoff.KunststoffLookAndFeel

Now if from developer, I select the KunstoffLookAndFeel, it ends up in servoy.properties as

selectedlnf = com.incors.plaf.kunststoff.KunststoffLookAndFeel

Note the different case for the L.
So in the servoy.properties, I end up with:

selectedLnf=com.incors.plaf.kunststoff.KunststoffLookAndFeel
selectedlnf=com.incors.plaf.kunststoff.KunststoffLookAndFeel

When I use the server with a selectedLnf property set, I was expecting a client to pick it by default.
But no. And if I look at the client cache, in the servoy_client.properties, I see that the property ‘localhost8080_selectedlnf=’ (in case of a localhost server) is desperately empty,
while in the same file, I have:

selectedlnf=com.incors.plaf.kunststoff.KunststoffLookAndFeel

Only if in the client do I select a look and feel, will ‘localhost8080_selectedlnf’ be set in the servoy_client.properties.
And the look and feel is then properly use in subsequent client sessions.

Is this expected behavior and in that case what is the admin parameter ‘selectedLnf’ supposed to do?

Thanks for your comments on this,

In 3.5 this was indeed the case, the a client takes over the l&nf (only first time) from the server.
We found out also, that this is not the case anymore with Sercoy 5.x

I think it’s a bug.
Did you filed a issue request?

Harjo:
Did you filed a issue request?

I will, if Servoy confirms…
In the meantime, I did my own LAF pusher plugin, - with added ‘font’ parameter :wink:

It should indeed push the LAF to first time clients. If it doesn’t, please file a case for it.

Paul

pbakker:
It should indeed push the LAF to first time clients. If it doesn’t, please file a case for it.

Paul

Done: case #303633.

ptalbot:

pbakker:
It should indeed push the LAF to first time clients. If it doesn’t, please file a case for it.

Paul

Done: case #303633.

Will be fixed for next release. (5.2 rc2)

Is there anyway to get the fix to apply to Servoy 5.1.4?
The 5.2.x change in authentication methods is a big pill to swallow when you have multiple very large solutions that are in production environments.
The plan was to implement the new authentication methods and test the solutions all in a sandbox environment.
Once testing is complete, we would move Servoy 5.2.x and the modified solutions to the production server.
But that will not happen until early next year. I still need a fix for 5.1.4, possibly a 5.1.5 version. Patrick is there any possiblity you could share your plugin?

You can , de-select the new enhanced security, and than everything works as before, except, you have a lot of fixes. :-)
if there was not the new security feature, this release was named: 5.1.5! (I think)

but again, you can de-select that, upgrade, and deal with that later…

Note that I don’t think that the new authentication mechanism is such a big pill to swallow…
All in all, it took me about 2 hours to adapt my login mechanism to the new way :)
The size of the app isn’t an issue, you have 2 modules to add, a login module which basically contains one form (that you probably have already), and a few global methods to put in an authenticate module, not such a big deal.

But for what it’s worth, you can find attached this very simple workaround that will help before you make the jump.

To use it, place it in your /plugins folder (it is signed).
Restart your server, you will see 2 new (optional) properties in the server admin plugins page:
[attachment=0]laf.gif[/attachment]

laf.defaultFont will set the font, using the default format used in Servoy forms, if in doubt, set a label to the font you want, then open the .frm file with a text editor, you will see the syntax to use like fontType:“Arial,0,10” for example, just copy the string (without quotes).
laf.defaultLAF is the fully qualified name of the main class of the look and field you want to use, for example for kunstoff, it is: com.incors.plaf.kunststoff.KunststoffLookAndFeel
Of course you will have to make sure that the look and feel jar you want to use is located in the /lafs folder of you application_server.

That’s all there is to it! There’s no client plugin visible in the plugins node of the SolutionExplorer, the plugin is only visible in the server admin plugins page.
Note that this will not work in developer since the look and feel is set again after the initialization of the plugin by Servoy, but installed on a server, it will push the look and feel and and font chosen to the client as their default.

Hope this helps,

laf.jar (6.89 KB)