Below you will find pages that utilize the taxonomy term “Settings”
Settings in Sharepoint_config database instead of appSettings
An alternative to store key-value paired properties in appSettings in web.config we can use Sharepoint_config database by creating our own SPPersistedObject. First we have to create a class which inherits from SPPersistedObject and decorate its properties with [Persisted]:
namespace Takana.SharePoint
{
public class Settings: SPPersistedObject
{
\[Persisted\]
public string DbConString;
public LinkCheckerPersistedSettings() { }
public LinkCheckerPersistedSettings(string name, SPPersistedObject parent) : base(name, parent) { }
}
}
```Then we must create such an object. Let's do it in Powershell:
if(-not(Get-PSSnapin | Where { $_.Name -eq “Microsoft.SharePoint.PowerShell”})) { Add-PSSnapin Microsoft.SharePoint.PowerShell }
Version 0.2.6: Settings improvement
Now a user can choose what to see on the map. Maybe only bike pumps or everything. To do that I created a new class ListPreferenceMultiSelect extends ListPreference which is more or less taken from DroidWeb tutorial. The source ListPreferenceMultiSelect.java was improved a little bit: The constructor checks if entries are not empty before creating indices. For the second a new method was added: prepareValueToStore, the opposite one of parseStoredValue. Here is my ListPreferenceMultiSelect.java and in the version 0.2.6. This version was published on the Market and committed to the repository.