- String string = Cache.getDefault("SEQUENCE_LINKS",
- UrlConstants.DEFAULT_STRING);
- UrlProviderFactoryI factory = new DesktopUrlProviderFactory(
- UrlConstants.DEFAULT_LABEL, string);
+ // get links selected to be in the menu (SEQUENCE_LINKS)
+ // and links entered by the user but not selected (STORED_LINKS)
+ String inMenuString = Cache.getDefault("SEQUENCE_LINKS", "");
+ String notInMenuString = Cache.getDefault("STORED_LINKS", "");
+ String defaultUrl = Cache.getDefault("DEFAULT_URL",
+ UrlConstants.DEFAULT_LABEL);
+
+ // if both links lists are empty, add the DEFAULT_URL link
+ // otherwise we assume the default link is in one of the lists
+ if (inMenuString.isEmpty() && notInMenuString.isEmpty())
+ {
+ inMenuString = UrlConstants.DEFAULT_STRING;
+ }
+ UrlProviderFactoryI factory = new DesktopUrlProviderFactory(defaultUrl,
+ inMenuString, notInMenuString);