Storing settings in servoy.properties

Questions and answers on developing, deploying and using plugins and JavaBeans

Storing settings in servoy.properties

Postby pbakker » Thu Aug 12, 2004 2:05 pm

Hi,

I noticed that when you create a serverside plugin with the option to set properties on the Servoy Admin page, that they get strored in the Servoy.properties with the name that you give them.

I see a possible conflict if multiple people start to create plugins with this feature and they would name the properties the same (for example: licensekey).

Whouldn't it be handy to store the properties in the servoy.properties with the name of the plugin in front of them? That way the mixing up of properties can be prevented.

I know we could include the name of the plugin as prefix to the name of the setting, but that looks very strange on the admin page

Just thinking hypothetical here.... :D

Paul
pbakker
 
Posts: 2822
Joined: Wed Oct 01, 2003 8:12 pm
Location: Amsterdam, the Netherlands

Postby Jan Blok » Mon Aug 23, 2004 5:07 pm

The documentation of the method reads:
For use in server-admin page, should be the same properties as set in preference panel. Key must be the properties name (prefix with plugin name! to prevent collisions), the value some description/information to dhow to user about this property
Jan Blok
Servoy
Jan Blok
 
Posts: 2684
Joined: Mon Jun 23, 2003 11:15 am
Location: Amsterdam

Postby pbakker » Thu Sep 16, 2004 3:47 pm

It's been a while since your response, Jan, but I'm running into this again.

I get what your saying, but I was wondering if you could change the logic a bit, so that the entry int eh Servoy.properties automatically get's prefixed with the plugin name, and that in the Preference Panel and on the Admin webpage, I do not have to prefix the name of the property.

The name of the property, together with the prefix (pluginname) can become quite long and, at least on the Admin page, all properties for a certain plugin are allready grouped together by plugin with as title the pluginname.

So, in conclusion, the Admin page becomes a bit messy currently (according to my opinion) if you have to prefix all properties with their plugin name.

Hope you see what I mean...

Paul
pbakker
 
Posts: 2822
Joined: Wed Oct 01, 2003 8:12 pm
Location: Amsterdam, the Netherlands

Postby Jan Blok » Fri Sep 17, 2004 4:39 pm

Whould it helpo if we make the font smaller on the admin page, we prefer to show the full name so it is clear for all servoy server admins and servoy developers what the name of the property is.
Jan Blok
Servoy
Jan Blok
 
Posts: 2684
Joined: Mon Jun 23, 2003 11:15 am
Location: Amsterdam

Postby pbakker » Fri Sep 17, 2004 4:49 pm

Tha could help, or place the name of the property above the textfield with the value.

But I'm stubborn :D

I think it's pretty clear if the block of properties belonging to one plugin have the pluginname as header (as it currently allready has) and that the underlying properties are only shown with their property name (exluding the pluginname), while in the servoy.properties the two (Pluginname and propertyname) are concatenated.

But hey, that's just me.

Paul
pbakker
 
Posts: 2822
Joined: Wed Oct 01, 2003 8:12 pm
Location: Amsterdam, the Netherlands

Postby sebster » Fri Apr 15, 2005 3:26 pm

Actually we wish to leave it up to the user to name their plugin properties to whatever they want. This is especially useful if you have multiple plugins that use a base of common properties, or if you want to name them in some way which represents their functional grouping instead of which plugin they happen to be from.

An example are mail.* properties which you could use for configuring mail stuff, such as the mail.smtp.host property, etc.

Greetings,
Sebastiaan
Sebastiaan van Erk
Servoy
sebster
 
Posts: 251
Joined: Thu Apr 24, 2003 10:03 am
Location: Utrecht, The Netherlands

Postby pbakker » Fri Apr 15, 2005 3:33 pm

wow, that reply is a bit late.... :lol:

I think there have been quite a few changes to the Admin pages since I brought this issue up.

It aint an issue anymore. The layout is a lot better now.

Paul
pbakker
 
Posts: 2822
Joined: Wed Oct 01, 2003 8:12 pm
Location: Amsterdam, the Netherlands


Return to Plugins and Beans

Who is online

Users browsing this forum: Google [Bot] and 39 guests

cron